From: Chao Yu <yuchao0@huawei.com>
To: Yunlei He <heyunlei@huawei.com>, jaegeuk@kernel.org, chao@kernel.org
Cc: miaoxie@huawei.com, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: move dir data flush to write checkpoint process
Date: Tue, 6 Nov 2018 17:19:36 +0800 [thread overview]
Message-ID: <9645a434-87e9-bf24-7ad8-a908f7b479a7@huawei.com> (raw)
In-Reply-To: <1541471129-25373-1-git-send-email-heyunlei@huawei.com>
On 2018/11/6 10:25, Yunlei He wrote:
> This patch move dir data flush to write checkpoint process, by
> doing this, it may reduce some time for dir fsync.
>
> pre:
> -f2fs_do_sync_file enter
> -file_write_and_wait_range <- flush & wait
> -write_checkpoint
> -do_checkpoint <- wait all
> -f2fs_do_sync_file exit
>
> now:
> -f2fs_do_sync_file enter
> -write_checkpoint
> -block_operations <- flush dir & no wait
> -do_checkpoint <- wait all
> -f2fs_do_sync_file exit
>
> Signed-off-by: Yunlei He <heyunlei@huawei.com>
> ---
> fs/f2fs/file.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 88b1246..9eaf07f 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -216,6 +216,9 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
>
> trace_f2fs_sync_file_enter(inode);
>
> + if (S_ISDIR(inode->i_mode))
> + goto go_write;
Not sure, will we skip calling f2fs_write_inode due to this check? so we
will miss some metadata update cached in inode cache?
Thanks,
> +
> /* if fdatasync is triggered, let's do in-place-update */
> if (datasync || get_dirty_pages(inode) <= SM_I(sbi)->min_fsync_blocks)
> set_inode_flag(inode, FI_NEED_IPU);
>
next prev parent reply other threads:[~2018-11-06 9:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 2:25 [PATCH] f2fs: move dir data flush to write checkpoint process Yunlei He
2018-11-06 9:19 ` Chao Yu [this message]
2018-11-06 11:19 ` heyunlei
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=9645a434-87e9-bf24-7ad8-a908f7b479a7@huawei.com \
--to=yuchao0@huawei.com \
--cc=chao@kernel.org \
--cc=heyunlei@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=miaoxie@huawei.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).