f2fs: add ioctl to get IO priority hint

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

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim
2025-02-12 02:29:30 +00:00
parent 4f91f07470
commit 5f95c1812a
4 changed files with 34 additions and 0 deletions
+7
View File
@@ -44,6 +44,7 @@
#define F2FS_IOC_COMPRESS_FILE _IO(F2FS_IOCTL_MAGIC, 24)
#define F2FS_IOC_START_ATOMIC_REPLACE _IO(F2FS_IOCTL_MAGIC, 25)
#define F2FS_IOC_GET_DEV_ALIAS_FILE _IOR(F2FS_IOCTL_MAGIC, 26, __u32)
#define F2FS_IOC_IO_PRIO _IOW(F2FS_IOCTL_MAGIC, 27, __u32)
/*
* should be same as XFS_IOC_GOINGDOWN.
@@ -63,6 +64,12 @@
#define F2FS_TRIM_FILE_ZEROOUT 0x2 /* zero out */
#define F2FS_TRIM_FILE_MASK 0x3
/* for F2FS_IOC_IO_PRIO */
enum {
F2FS_IOPRIO_WRITE = 1, /* high write priority */
F2FS_IOPRIO_MAX,
};
struct f2fs_gc_range {
__u32 sync;
__u64 start;