Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:set the logical block size

Proto:static int blkdev_bszset(struct block_device *bdev, fmode_t mode, int __user *argp)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
fmode_tmode
int __user *argp
464  If Not Check operation authority Then Return -EACCES
466  If Not argp Then Return -EINVAL
468  If Get a simple variable from user space(n, argp) Then Return -EFAULT
471  If Not (mode & File is opened with O_EXCL (only set for block devices) ) Then
472  bdgrab(bdev)
473  If blkdev_get(bdev, mode | File is opened with O_EXCL (only set for block devices) , & bdev) < 0 Then Return -EBUSY
477  ret = set_blocksize(bdev, n)
478  If Not (mode & File is opened with O_EXCL (only set for block devices) ) Then blkdev_put(bdev, mode | File is opened with O_EXCL (only set for block devices) )
480  Return ret
Caller
NameDescribe
blkdev_ioctlalways keep this in sync with compat_blkdev_ioctl()