f2fs: allows setting compress option to files which marked with FI_MMAP_FILE
PATCH 1/1 f2fs: allows setting compress option to files which marked with FI_MMAP_FILE
Allow to compress mmap files in commit e3c548323d32 ("f2fs: let's allow compression for mmap files"). However, we cannot set the compress option to the mmap file. To keep the same concept in both compress_modes, f2fs_ioc_set_compress_option should also allow it.
Let's remove checking mmap files in f2fs_ioc_set_compress_option so that we can set compress option to the mmap files.
--- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/file.c +1 -1
@@ -3957,7 +3957,7 @@ static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long arg)file_start_write (filp);inode_lock (inode); -if (f2fs_is_mmap_file (inode) ||get_dirty_pages (inode)) { +if (get_dirty_pages (inode)) { ret = -EBUSY ; goto out; }
Signature · 1 line
2.39.0
Chao Yu
maintainerQuoted 7 lines · Qi Han
Allow to compress mmap files in commit
e3c548323d32("f2fs: let's allow compression for mmap files"). However, we cannot set the compress option to the mmap file. To keep the same concept in bothcompress_modes,f2fs_ioc_set_compress_optionshould also allow it.Let's remove checking mmap files in
f2fs_ioc_set_compress_optionso that we can set compress option to the mmap files.
Could you please check below patch?
https://lore.kernel.org/linux-f2fs-devel/[email protected]
Thanks,
Quoted 19 lines
Signed-off-by Qi Han <[email protected]>--- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/file.c +1
-1@@ -3957,7 +3957,7 @@ static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long arg)file_start_write (filp);inode_lock (inode); -if (f2fs_is_mmap_file (inode) ||get_dirty_pages (inode)) { +if (get_dirty_pages (inode)) { ret = -EBUSY ; goto out; }