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:
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
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
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
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
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
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
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