History

f2fs: add ioctl to get IO priority hint

This patch adds an ioctl to give a per-file priority hint to attach REQ_PRIO.

Jaegeuk Kim committed 1 year ago

Commit 5f95c181 parent 4f91f074 files · +34 −0Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/f2fs.h+7−0
@@ -44,6 +44,7 @@ · 43 unmodified lines
4444 #define F2FS_IOC_COMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 24)
4545 #define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25)
4646 #define F2FS_IOC_GET_DEV_ALIAS_FILE _IOR(F2FS_IOCTL_MAGIC, 26, __u32)
47+#define F2FS_IOC_IO_PRIO _IOW(F2FS_IOCTL_MAGIC, 27, __u32)
4748
4849 /*
4950 * should be same as XFS_IOC_GOINGDOWN.
@@ -63,6 +64,12 @@ · 13 unmodified lines
6364 #define F2FS_TRIM_FILE_ZEROOUT 0x2 /* zero out */
6465 #define F2FS_TRIM_FILE_MASK 0x3
6566
67+/* for F2FS_IOC_IO_PRIO */
68+enum {
69+ F2FS_IOPRIO_WRITE = 1, /* high write priority */
70+ F2FS_IOPRIO_MAX,
71+};
72+
6673 struct f2fs_gc_range {
6774 __u32 sync;
6875 __u64 start;