[f2fs-dev] [PATCH] f2fs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method

2023-06-11 Thread Christoph Hellwig
Since commit a2ad63daa88b ("VFS: add FMODE_CAN_ODIRECT file flag") file systems can just set the FMODE_CAN_ODIRECT flag at open time instead of wiring up a dummy direct_IO method to indicate support for direct I/O. Do that for f2fs so that noop_direct_IO can eventually be removed. Signed-off-by:

[f2fs-dev] [PATCH v4 6/6] f2fs: access compression level and flags by extra attr ioctls

2023-06-11 Thread Sheng Yong via Linux-f2fs-devel
Allow getting or setting compression level and flags through F2FS_IOC_GET_EXTRA_ATTR and F2FS_IOC_SET_EXTRA_ATTR. Signed-off-by: Sheng Yong --- fs/f2fs/file.c| 56 --- include/uapi/linux/f2fs.h | 10 ++- 2 files changed, 55 insertions(+), 11

[f2fs-dev] [PATCH v4 3/6] f2fs: add helper to get inode chksum from inode page

2023-06-11 Thread Sheng Yong via Linux-f2fs-devel
Signed-off-by: Sheng Yong --- fs/f2fs/f2fs.h | 2 ++ fs/f2fs/inode.c | 21 + 2 files changed, 23 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 1b17bbe7e8656..a30c81ac7299d 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3478,6 +3478,8 @@ int

[f2fs-dev] [PATCH v4 5/6] f2fs: add f2fs_ioc_[get|set]_extra_attr

2023-06-11 Thread Sheng Yong via Linux-f2fs-devel
This patch introduces two ioctls: * f2fs_ioc_get_extra_attr * f2fs_ioc_set_extra_attr to get or modify values in f2fs_inode's extra attribute area. The argument of these two ioctls is `struct f2fs_extra_attr', which has three members: * field: indicates which field in extra attribute area

[f2fs-dev] [PATCH v4 4/6] f2fs: add f2fs_ioc_get_compress_blocks

2023-06-11 Thread Sheng Yong via Linux-f2fs-devel
This patch adds f2fs_ioc_get_compress_blocks() to provide a common f2fs_get_compress_blocks(). Signed-off-by: Sheng Yong --- fs/f2fs/file.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index

[f2fs-dev] [PATCH v4 0/6] f2fs: add f2fs_ioc_[get|set]_extra_attr

2023-06-11 Thread Sheng Yong via Linux-f2fs-devel
This patchset introduces two ioctls to get or modify values in f2fs_inode's extra attribute area: * f2fs_ioc_get_extra_attr * f2fs_ioc_set_extra_attr The argument of these two ioctls is `struct f2fs_extra_attr', which has three members: * field: indicates which field in extra attribute area

[f2fs-dev] [PATCH v4 1/6] f2fs: add helper to check compression level

2023-06-11 Thread Sheng Yong via Linux-f2fs-devel
This patch adds a helper function to check if compression level is valid. Signed-off-by: Sheng Yong --- fs/f2fs/compress.c | 31 +++ fs/f2fs/f2fs.h | 2 ++ fs/f2fs/super.c| 4 ++-- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git

[f2fs-dev] [PATCH v4 2/6] f2fs: cleanup MIN_INLINE_XATTR_SIZE

2023-06-11 Thread Sheng Yong via Linux-f2fs-devel
Signed-off-by: Sheng Yong --- fs/f2fs/super.c | 2 +- fs/f2fs/xattr.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 023981824d240..d7630f6dcbd62 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1361,7 +1361,7 @@ static int