Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\ioctl.c Create Date:2022-07-28 17:16:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_ioctl_zeroout

Proto:static int blk_ioctl_zeroout(struct block_device *bdev, fmode_t mode, unsigned long arg)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
fmode_tmode
unsigned longarg
214  If Not (mode & le is open for writing ) Then Return -EBADF
217  If copy_from_user(range, (void__user * )arg, size of range ) Then Return -EFAULT
220  start = range[0]
221  len = range[1]
222  end = start + len - 1
224  If start & 511 Then Return -EINVAL
226  If len & 511 Then Return -EINVAL
228  If 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 Then Return -EINVAL
230  If end < start Then Return -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  Return 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
Caller
NameDescribe
blkdev_ioctlalways keep this in sync with compat_blkdev_ioctl()