From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [PATCH 1/2] f2fs: use IPU for cold files
Date: Tue, 8 Aug 2017 10:57:56 +0800 [thread overview]
Message-ID: <d51293ed-a497-d6fa-4309-7ef8d6b45cd8@huawei.com> (raw)
In-Reply-To: <20170808014222.31097-1-jaegeuk@kernel.org>
On 2017/8/8 9:42, Jaegeuk Kim wrote:
> We expect cold files write data sequentially, but sometimes some of small data
> can be updated, which incurs fragmentation.
> Let's avoid that.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
> ---
> fs/f2fs/segment.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
> index 6b871b492fd5..7f700e54b77d 100644
> --- a/fs/f2fs/segment.h
> +++ b/fs/f2fs/segment.h
> @@ -577,6 +577,10 @@ static inline bool need_inplace_update_policy(struct inode *inode,
> if (test_opt(sbi, LFS))
> return false;
>
> + /* if this is cold file, we should overwrite to avoid fragmentation */
> + if (file_is_cold(inode))
> + return true;
> +
> if (policy & (0x1 << F2FS_IPU_FORCE))
> return true;
> if (policy & (0x1 << F2FS_IPU_SSR) && need_SSR(sbi))
>
prev parent reply other threads:[~2017-08-08 2:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 1:42 Jaegeuk Kim
2017-08-08 1:42 ` [PATCH 2/2] f2fs: introduce gc_urgent mode for background GC Jaegeuk Kim
2017-08-08 3:09 ` [PATCH 2/2 v2] " Jaegeuk Kim
2017-08-08 3:15 ` [PATCH 2/2] " Chao Yu
2017-08-08 3:40 ` Jaegeuk Kim
2017-08-10 10:44 ` Chao Yu
2017-08-08 2:57 ` 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=d51293ed-a497-d6fa-4309-7ef8d6b45cd8@huawei.com \
--to=yuchao0@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®