linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Qi Han <hanqi@vivo.com>, jaegeuk@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: allows setting compress option to files which marked with FI_MMAP_FILE
Date: Mon, 29 May 2023 19:25:46 +0800	[thread overview]
Message-ID: <9aa57363-14ce-d851-1b15-e2f376c28abc@kernel.org> (raw)
In-Reply-To: <20230524114159.8999-1-hanqi@vivo.com>

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;
>   	}


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

      reply	other threads:[~2023-05-29 11:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 11:41 [f2fs-dev] [PATCH] f2fs: allows setting compress option to files which marked with FI_MMAP_FILE Qi Han via Linux-f2fs-devel
2023-05-29 11:25 ` Chao Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9aa57363-14ce-d851-1b15-e2f376c28abc@kernel.org \
    --to=chao@kernel.org \
    --cc=hanqi@vivo.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).