mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] f2fs: allows setting compress option to files which marked with FI_MMAP_FILE
@ 2023-05-24 11:41 Qi Han
  2023-05-29 11:25 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Qi Han @ 2023-05-24 11:41 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, 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 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.

Signed-off-by: Qi Han <hanqi@vivo.com>
---
 fs/f2fs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 5ac53d2627d2..3a97b753a074 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -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;
 	}
-- 
2.39.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] f2fs: allows setting compress option to files which marked with FI_MMAP_FILE
  2023-05-24 11:41 [PATCH] f2fs: allows setting compress option to files which marked with FI_MMAP_FILE Qi Han
@ 2023-05-29 11:25 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2023-05-29 11:25 UTC (permalink / raw)
  To: Qi Han, jaegeuk; +Cc: linux-f2fs-devel, linux-kernel

On 2023/5/24 19:41, Qi Han wrote:
> 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.

Could you please check below patch?

https://lore.kernel.org/linux-f2fs-devel/20230529104709.2560779-1-chao@kernel.org

Thanks,

> 
> Signed-off-by: Qi Han <hanqi@vivo.com>
> ---
>   fs/f2fs/file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 5ac53d2627d2..3a97b753a074 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -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;
>   	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-29 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 11:41 [PATCH] f2fs: allows setting compress option to files which marked with FI_MMAP_FILE Qi Han
2023-05-29 11:25 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®