From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: complete checkpoints during remount
Date: Tue, 13 Sep 2022 11:11:23 +0800 [thread overview]
Message-ID: <791f5692-0814-2bd7-712a-829e1cedb891@kernel.org> (raw)
In-Reply-To: <YwaKbmB23U9czf51@google.com>
On 2022/8/25 4:30, Jaegeuk Kim wrote:
> Otherwise, pending checkpoints can contribute a race condition to give a
> quota warning.
>
> - Thread - checkpoint thread
> add checkpoints to the list
> do_remount()
> down_write(&sb->s_umount);
> f2fs_remount()
> block_operations()
> down_read_trylock(&sb->s_umount) = 0
> up_write(&sb->s_umount);
> f2fs_quota_sync()
> dquot_writeback_dquots()
> WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));
>
> Or,
>
> do_remount()
> down_write(&sb->s_umount);
> f2fs_remount()
> create a ckpt thread
> f2fs_enable_checkpoint() adds checkpoints
> wait for f2fs_sync_fs()
> trigger another pending checkpoint
> block_operations()
> down_read_trylock(&sb->s_umount) = 0
> up_write(&sb->s_umount);
> f2fs_quota_sync()
> dquot_writeback_dquots()
> WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
next prev parent reply other threads:[~2022-09-13 3:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 23:15 [PATCH 1/2] f2fs: flush pending checkpoints when freezing super Jaegeuk Kim
2022-08-19 23:15 ` [PATCH 2/2] f2fs: complete checkpoints during remount Jaegeuk Kim
2022-08-24 20:30 ` [PATCH 2/2 v2] " Jaegeuk Kim
2022-09-13 3:11 ` Chao Yu [this message]
2022-08-24 20:02 ` [PATCH 1/2] f2fs: flush pending checkpoints when freezing super Jaegeuk Kim
2022-09-13 2:58 ` [f2fs-dev] " Chao Yu
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=791f5692-0814-2bd7-712a-829e1cedb891@kernel.org \
--to=chao@kernel.org \
--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
Powered by JetHome