Skip to content

Commit 4cfa8a8

Browse files
committed
tools/include: Sync uapi/linux/fs.h with the kernel sources
To pick up the changes from: 41bcbe5 ("fs: FS_IOC_GETUUID") ae8c511 ("fs: add FS_IOC_GETFSSYSFSPATH") 73fa754 ("vfs: add RWF_NOAPPEND flag for pwritev2") This should be used to beautify fs syscall arguments and it addresses these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/fs.h include/uapi/linux/fs.h Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Cc: Alexander Viro <[email protected]> Cc: [email protected] Signed-off-by: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3ef842a commit 4cfa8a8

File tree

1 file changed

+29
-1
lines changed
  • tools/include/uapi/linux

1 file changed

+29
-1
lines changed

tools/include/uapi/linux/fs.h

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ struct fstrim_range {
6464
__u64 minlen;
6565
};
6666

67+
/*
68+
* We include a length field because some filesystems (vfat) have an identifier
69+
* that we do want to expose as a UUID, but doesn't have the standard length.
70+
*
71+
* We use a fixed size buffer beacuse this interface will, by fiat, never
72+
* support "UUIDs" longer than 16 bytes; we don't want to force all downstream
73+
* users to have to deal with that.
74+
*/
75+
struct fsuuid2 {
76+
__u8 len;
77+
__u8 uuid[16];
78+
};
79+
80+
struct fs_sysfs_path {
81+
__u8 len;
82+
__u8 name[128];
83+
};
84+
6785
/* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */
6886
#define FILE_DEDUPE_RANGE_SAME 0
6987
#define FILE_DEDUPE_RANGE_DIFFERS 1
@@ -215,6 +233,13 @@ struct fsxattr {
215233
#define FS_IOC_FSSETXATTR _IOW('X', 32, struct fsxattr)
216234
#define FS_IOC_GETFSLABEL _IOR(0x94, 49, char[FSLABEL_MAX])
217235
#define FS_IOC_SETFSLABEL _IOW(0x94, 50, char[FSLABEL_MAX])
236+
/* Returns the external filesystem UUID, the same one blkid returns */
237+
#define FS_IOC_GETFSUUID _IOR(0x15, 0, struct fsuuid2)
238+
/*
239+
* Returns the path component under /sys/fs/ that refers to this filesystem;
240+
* also /sys/kernel/debug/ for filesystems with debugfs exports
241+
*/
242+
#define FS_IOC_GETFSSYSFSPATH _IOR(0x15, 1, struct fs_sysfs_path)
218243

219244
/*
220245
* Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
@@ -301,9 +326,12 @@ typedef int __bitwise __kernel_rwf_t;
301326
/* per-IO O_APPEND */
302327
#define RWF_APPEND ((__force __kernel_rwf_t)0x00000010)
303328

329+
/* per-IO negation of O_APPEND */
330+
#define RWF_NOAPPEND ((__force __kernel_rwf_t)0x00000020)
331+
304332
/* mask of flags supported by the kernel */
305333
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
306-
RWF_APPEND)
334+
RWF_APPEND | RWF_NOAPPEND)
307335

308336
/* Pagemap ioctl */
309337
#define PAGEMAP_SCAN _IOWR('f', 16, struct pm_scan_arg)

0 commit comments

Comments
 (0)