* [f2fs-dev] [PATCH] f2fs: allow compression for mmap files in compress_mode=user
[not found] <CGME20220524022214epcas1p28d7b7de846e44cedf825eb4f5973932d@epcas1p2.samsung.com>
@ 2022-05-24 1:29 ` Sungjong Seo
2022-05-25 1:59 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Sungjong Seo @ 2022-05-24 1:29 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: daehojeong, sj1557.seo, linux-kernel, linux-f2fs-devel
Since commit e3c548323d32 ("f2fs: let's allow compression for mmap files"),
it has been allowed to compress mmap files. However, in compress_mode=user,
it is not allowed yet. To keep the same concept in both compress_modes,
f2fs_ioc_(de)compress_file() should also allow it.
Let's remove checking mmap files in f2fs_ioc_(de)compress_file() so that
the compression for mmap files is also allowed in compress_mode=user.
Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
---
fs/f2fs/file.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 7aac53ac5acf..a05d842a7e72 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3945,11 +3945,6 @@ static int f2fs_ioc_decompress_file(struct file *filp, unsigned long arg)
goto out;
}
- if (f2fs_is_mmap_file(inode)) {
- ret = -EBUSY;
- goto out;
- }
-
ret = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
if (ret)
goto out;
@@ -4017,11 +4012,6 @@ static int f2fs_ioc_compress_file(struct file *filp, unsigned long arg)
goto out;
}
- if (f2fs_is_mmap_file(inode)) {
- ret = -EBUSY;
- goto out;
- }
-
ret = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
if (ret)
goto out;
--
2.25.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: allow compression for mmap files in compress_mode=user
2022-05-24 1:29 ` [f2fs-dev] [PATCH] f2fs: allow compression for mmap files in compress_mode=user Sungjong Seo
@ 2022-05-25 1:59 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2022-05-25 1:59 UTC (permalink / raw)
To: Sungjong Seo, jaegeuk; +Cc: daehojeong, linux-kernel, linux-f2fs-devel
On 2022/5/24 9:29, Sungjong Seo wrote:
> Since commit e3c548323d32 ("f2fs: let's allow compression for mmap files"),
> it has been allowed to compress mmap files. However, in compress_mode=user,
> it is not allowed yet. To keep the same concept in both compress_modes,
> f2fs_ioc_(de)compress_file() should also allow it.
>
> Let's remove checking mmap files in f2fs_ioc_(de)compress_file() so that
> the compression for mmap files is also allowed in compress_mode=user.
>
> Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-25 1:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20220524022214epcas1p28d7b7de846e44cedf825eb4f5973932d@epcas1p2.samsung.com>
2022-05-24 1:29 ` [f2fs-dev] [PATCH] f2fs: allow compression for mmap files in compress_mode=user Sungjong Seo
2022-05-25 1:59 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).