From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Weichao Guo <guoweichao@oppo.com>
Cc: zhangshiming@oppo.com, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: let FI_OPU_WRITE override FADVISE_COLD_BIT
Date: Wed, 7 Sep 2022 19:28:19 -0700 [thread overview]
Message-ID: <YxlTQ3H+PPKcvpyc@google.com> (raw)
In-Reply-To: <1662518328-4925-1-git-send-email-guoweichao@oppo.com>
On 09/07, Weichao Guo wrote:
> Cold files may be fragmented due to SSR, defragment is needed as
> sequential reads are dominant scenarios of these files. FI_OPU_WRITE
> should override FADVISE_COLD_BIT to avoid defragment fails.
>
> Signed-off-by: Weichao Guo <guoweichao@oppo.com>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/data.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index aa3ccdd..97b75f0 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -2543,7 +2543,7 @@ bool f2fs_should_update_inplace(struct inode *inode, struct f2fs_io_info *fio)
> return true;
>
> /* if this is cold file, we should overwrite to avoid fragmentation */
> - if (file_is_cold(inode))
> + if (file_is_cold(inode) && !is_inode_flag_set(FI_OPU_WRITE))
Fixed build error by adding inode above.
> return true;
>
> return check_inplace_update_policy(inode, fio);
> --
> 2.7.4
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
prev parent reply other threads:[~2022-09-08 2:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 2:38 [f2fs-dev] [PATCH] f2fs: let FI_OPU_WRITE override FADVISE_COLD_BIT Weichao Guo via Linux-f2fs-devel
2022-09-08 2:28 ` Jaegeuk Kim [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=YxlTQ3H+PPKcvpyc@google.com \
--to=jaegeuk@kernel.org \
--cc=guoweichao@oppo.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=zhangshiming@oppo.com \
/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).