Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:file_ioctl

Proto:static int file_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)

Type:int

Parameter:

TypeParameterName
struct file *filp
unsigned intcmd
unsigned longarg
527  inode = file_inode(filp)
528  __user * p = arg
531  Case cmd == map access
532  Return ioctl_fibmap(filp, p)
533  Case cmd == FIONREAD
534  Return Write a simple value into user space(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 - f_pos, p)
535  Case cmd == FS_IOC_RESVSP
536  Case cmd == FS_IOC_RESVSP64
537  Return This provides compatibility with legacy XFS pre-allocation ioctls* which predate the fallocate syscall.* Only the l_start, l_len and l_whence fields of the 'struct space_resv'* are used here, rest are ignored.
538  Case cmd == FS_IOC_UNRESVSP
539  Case cmd == FS_IOC_UNRESVSP64
540  Return This provides compatibility with legacy XFS pre-allocation ioctls* which predate the fallocate syscall.* Only the l_start, l_len and l_whence fields of the 'struct space_resv'* are used here, rest are ignored.
541  Case cmd == FS_IOC_ZERO_RANGE
542  Return This provides compatibility with legacy XFS pre-allocation ioctls* which predate the fallocate syscall.* Only the l_start, l_len and l_whence fields of the 'struct space_resv'* are used here, rest are ignored.
545  Return vfs_ioctl - call filesystem specific ioctl methods*@filp: open file to invoke ioctl method on*@cmd: ioctl command to execute*@arg: command-specific argument for ioctl* Invokes filesystem specific ->unlocked_ioctl, if one exists; otherwise* returns -ENOTTY.
Caller
NameDescribe
do_vfs_ioctlWhen you add any new common ioctls to the switches above and below* please update compat_sys_ioctl() too.* do_vfs_ioctl() is not for drivers and not intended to be EXPORT_SYMBOL()'d.* It's just a simple helper for sys_ioctl and compat_sys_ioctl.