函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:set the logical block size

函数原型:static int blkdev_bszset(struct block_device *bdev, fmode_t mode, int __user *argp)

返回类型:int

参数:

类型参数名称
struct block_device *bdev
fmode_tmode
int __user *argp
464  如果非操作权限检查则返回:负EACCES
466  如果非argp则返回:负EINVAL
468  如果Careful: we have to cast the result to the type of the pointer* for sign reasons(n, argp)则返回:负EFAULT
471  如果非mode按位与File is opened with O_EXCL (only set for block devices) 的值则
472  bdgrab(bdev)
473  如果blkdev_get(bdev, mode | File is opened with O_EXCL (only set for block devices) , & bdev)小于0则返回:负EBUSY
477  ret等于set_blocksize(bdev, n)
478  如果非mode按位与File is opened with O_EXCL (only set for block devices) 的值则blkdev_put(bdev, mode | File is opened with O_EXCL (only set for block devices) )
480  返回:ret
调用者
名称描述
blkdev_ioctlalways keep this in sync with compat_blkdev_ioctl()