[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <791f5692-0814-2bd7-712a-829e1cedb891@kernel.org>
Date: Tue, 13 Sep 2022 11:11:23 +0800
From: Chao Yu <chao@...nel.org>
To: Jaegeuk Kim <jaegeuk@...nel.org>, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: complete checkpoints during
remount
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@...nel.org>
Reviewed-by: Chao Yu <chao@...nel.org>
Thanks,
Powered by blists - more mailing lists