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: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.

Proto:int ioctl_preallocate(struct file *filp, int mode, void __user *argp)

Type:int

Parameter:

TypeParameterName
struct file *filp
intmode
void __user *argp
472  inode = file_inode(filp)
475  If copy_from_user( & sr, argp, size of sr ) Then Return -EFAULT
479  Case l_whence == seek relative to beginning of file
480  Break
481  Case l_whence == seek relative to current file position
482  l_start += f_pos
483  Break
484  Case l_whence == seek relative to end of file
485  l_start += 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
486  Break
487  Default
488  Return -EINVAL
491  Return vfs_fallocate(filp, mode | default is extend size , l_start, len == 0 means until end of file )
Caller
NameDescribe
file_ioctl