函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\ioctl.c Create Date:2022-07-27 18:51:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blk_ioctl_zeroout

函数原型:static int blk_ioctl_zeroout(struct block_device *bdev, fmode_t mode, unsigned long arg)

返回类型:int

参数:

类型参数名称
struct block_device *bdev
fmode_tmode
unsigned longarg
214  如果非mode按位与le is open for writing 的值则返回:负EBADF
217  如果copy_from_user(range, (void__user * )arg, range的长度)则返回:负EFAULT
220  start等于range[0]
221  len等于range[1]
222  end等于startlen减1
224  如果start按位与511则返回:负EINVAL
226  如果len按位与511则返回:负EINVAL
228  如果end大于等于NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they 则返回:负EINVAL
230  如果end小于start则返回:负EINVAL
234  mapping等于i_mapping
235  runcate_inode_pages_range - truncate range of pages specified by start & end byte offsets*@mapping: mapping to truncate*@lstart: offset from which to truncate*@lend: offset to which to truncate (inclusive)* Truncate the page cache, removing the pages that
237  返回:lkdev_issue_zeroout - zero-fill a block range*@bdev: blockdev to write*@sector: start sector*@nr_sects: number of sectors to write*@gfp_mask: memory allocation flags (for bio_alloc)*@flags: controls detailed behavior* Description:* Zero-fill a block
调用者
名称描述
blkdev_ioctlalways keep this in sync with compat_blkdev_ioctl()