函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\stat.c Create Date:2022-07-29 10:32:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:cp_statx

函数原型:static __attribute__((__noinline__)) int cp_statx(const struct kstat *stat, struct statx __user *buffer)

返回类型:int

参数:

类型参数名称
const struct kstat *stat
struct statx __user *buffer
531  memset( & tmp, 0, 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  返回:如果copy_to_user(buffer, & tmp, tmp的长度)则负EFAULT否则0
调用者
名称描述
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.