linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Zhang Qilong <zhangqilong3@huawei.com>, jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix the race condition of resize flag between resizefs
Date: Thu, 20 Oct 2022 09:19:19 +0800	[thread overview]
Message-ID: <0f435090-f75c-08c8-a8e5-567be7225974@kernel.org> (raw)
In-Reply-To: <20221018024532.44184-2-zhangqilong3@huawei.com>

On 2022/10/18 10:45, Zhang Qilong wrote:
> Because the set/clear SBI_IS_RESIZEFS flag not between any locks,
> In the following case:
>    thread1			thread2
>     ->ioctl(resizefs)
>      ->set RESIZEFS flag		 ->ioctl(resizefs)
>      ...                   	  ->set RESIZEFS flag
>      ->clear RESIZEFS flag
>      				  ->resizefs stream
> 				    # No RESIZEFS flag in the stream
> 
> Also before freeze_super, the resizefs not started, we should not set
> the SBI_IS_RESIZEFS flag.
> 
> So move the set/clear SBI_IS_RESIZEFS flag between the cp_mutex and
> gc_lock.
> 
> Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress")
> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2022-10-20  1:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  2:45 [f2fs-dev] [PATCH] f2fs: Fix data consistency in f2fs_move_file_range() Zhang Qilong via Linux-f2fs-devel
2022-10-18  2:45 ` [f2fs-dev] [PATCH] f2fs: Fix the race condition of resize flag between resizefs Zhang Qilong via Linux-f2fs-devel
2022-10-20  1:19   ` Chao Yu [this message]
2022-10-20  1:29 ` [f2fs-dev] [PATCH] f2fs: Fix data consistency in f2fs_move_file_range() Chao Yu
2022-10-20  7:27   ` [f2fs-dev] 答复: " zhangqilong via Linux-f2fs-devel
2022-10-25  1:17     ` Chao Yu
2022-10-25  6:27       ` [f2fs-dev] 答复: " zhangqilong via Linux-f2fs-devel
2022-10-25  6:41         ` Chao Yu
2022-10-25  7:01           ` [f2fs-dev] 答复: " zhangqilong via Linux-f2fs-devel
2022-10-25  7:20             ` Chao Yu
2022-10-25  7:36               ` [f2fs-dev] 答复: " zhangqilong via Linux-f2fs-devel
2022-10-25  7:54                 ` 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=0f435090-f75c-08c8-a8e5-567be7225974@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=zhangqilong3@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).