From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Chao Yu <yuchao0@huawei.com>
Subject: Re: [PATCH 2/2] f2fs: fix to update node page under cp_rwsem
Date: Fri, 26 Aug 2016 10:04:55 -0700 [thread overview]
Message-ID: <20160826170455.GB88444@jaegeuk> (raw)
In-Reply-To: <1472228072-4555-2-git-send-email-chao@kernel.org>
On Sat, Aug 27, 2016 at 12:14:32AM +0800, Chao Yu wrote:
> From: Chao Yu <yuchao0@huawei.com>
>
> Update node page under cp_rwsem in order to keep data consistency
> during writting checkpoint.
>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> ---
> fs/f2fs/inode.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
> index 9ac5efc..1057c73 100644
> --- a/fs/f2fs/inode.c
> +++ b/fs/f2fs/inode.c
> @@ -377,8 +377,11 @@ retry:
> goto retry;
> }
>
> - if (err)
> + if (err) {
> + f2fs_lock_op(sbi);
> update_inode_page(inode);
> + f2fs_unlock_op(sbi);
> + }
Any corner case?
Now, it allows updating node page when checkpoint is doing.
Thanks,
> sb_end_intwrite(inode->i_sb);
> no_delete:
> stat_dec_inline_xattr(inode);
> --
> 2.7.2
next prev parent reply other threads:[~2016-08-26 17:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 16:14 [PATCH 1/2] f2fs: do in batch synchronously readahead during GC Chao Yu
2016-08-26 16:14 ` [PATCH 2/2] f2fs: fix to update node page under cp_rwsem Chao Yu
2016-08-26 17:04 ` Jaegeuk Kim [this message]
2016-08-27 8:30 ` Chao Yu
2016-08-29 16:40 ` Jaegeuk Kim
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=20160826170455.GB88444@jaegeuk \
--to=jaegeuk@kernel.org \
--cc=chao@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@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