Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cp_statx

Proto:static __attribute__((__noinline__)) int cp_statx(const struct kstat *stat, struct statx __user *buffer)

Type:int

Parameter:

TypeParameterName
const struct kstat *stat
struct statx __user *buffer
531  memset( & tmp, 0, size of tmp )
533  What results were written [uncond] = What fields the user got
534  Preferred general I/O size [uncond] = Preferred I/O size
535  Flags conveying information about the file [uncond] = attributes
536  Number of hard links = nlink
537  User ID of owner = m_kuid_munged - Create a uid from a kuid user-namespace pair.*@targ: The user namespace we want a uid in.*@kuid: The kernel internal uid to start with.* Map @kuid into the user-namespace specified by @targ and* return the resulting uid.
538  Group ID of owner = m_kgid_munged - Create a gid from a kgid user-namespace pair.*@targ: The user namespace we want a gid in.*@kgid: The kernel internal gid to start with.* Map @kgid into the user-namespace specified by @targ and* return the resulting gid.
539  File mode = mode
540  Inode number = ino
541  File size = size
542  Number of 512-byte blocks allocated = blocks
543  Mask to show what's supported in stx_attributes = attributes_mask
544  tv_sec = seconds
545  tv_nsec = nanoseconds
546  tv_sec = seconds
547  tv_nsec = nanoseconds
548  tv_sec = seconds
549  tv_nsec = nanoseconds
550  tv_sec = seconds
551  tv_nsec = nanoseconds
552  Device ID of special file [if bdev/cdev] = MAJOR(rdev)
553  stx_rdev_minor = MINOR(rdev)
554  ID of device containing file [uncond] = MAJOR(dev)
555  stx_dev_minor = MINOR(dev)
557  Return If copy_to_user(buffer, & tmp, size of tmp ) Then -EFAULT Else 0
Caller
NameDescribe
SYSCALL_DEFINE5sys_statx - System call to get enhanced stats*@dfd: Base directory to pathwalk from *or* fd to stat.*@filename: File to stat or "" with AT_EMPTY_PATH*@flags: AT_* flags to control pathwalk.*@mask: Parts of statx struct actually required.