linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "zhangyi (F)" <yi.zhang@huawei.com>
To: Wang Shilong <wshilong@ddn.com>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Cc: "tytso@mit.edu" <tytso@mit.edu>,
	"adilger.kernel@dilger.ca" <adilger.kernel@dilger.ca>,
	"miaoxie@huawei.com" <miaoxie@huawei.com>
Subject: Re: [PATCH 1/2] ext4: fix race when setting the bitmap corrupted flag again
Date: Wed, 19 Dec 2018 11:35:12 +0800	[thread overview]
Message-ID: <3e2b94e8-935e-b4bb-f40d-19aa3cce1d24@huawei.com> (raw)
In-Reply-To: <0861E7C3-E642-464F-8987-B7094EFD1B2B@ddn.com>

On 2018/12/18 22:25, Wang Shilong Wrote:
> Hi,
> 
> 在 2018/12/18 下午7:57,“zhangyi (F)”<yi.zhang@huawei.com> 写入:
> 
>     Commit 9af0b3d12577 "ext4: fix race when setting the bitmap corrupted
>     flag" want to fix race between setting inode/block bitmap corrupted
>     flag and reducing free group inodes/clusters counter to prevent
>     multiple frees. But ext4_test_and_set_bit() will invoke
>     __test_and_set_bit() which is non-atomic, so the race is still there.
>     Fix this by invoke test_and_set_bit() instead.
>    
>     Fixes: 9af0b3d12577 ("ext4: fix race when setting the bitmap corrupted flag")
>     Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
> 
> Thanks for fixing this!, I was not aware of __test_and_set_bit() is not non-atomic operation before.
> 
> Reviewed-by: Wang Shilong <wshilong@ddn.com>
> 
> Btw for a stable process question, commit 9af0b3d12577 had CC tag to Stable kernel, should we
> add it again here or with 'Fixes' tag, it will be included automatically?
> 
Thank you for reminding me of the CC stable tag, I missed this tag and I'm not sure it
will be added automatically or not. Anyway, I will add this tag in the next iteration.

Thanks,
Yi.

      reply	other threads:[~2018-12-19  3:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 12:00 [PATCH 1/2] ext4: fix race when setting the bitmap corrupted flag again zhangyi (F)
2018-12-18 12:00 ` [PATCH 2/2] ext4: clean up group state test macros with predicate functions zhangyi (F)
2018-12-18 14:40   ` Wang Shilong
2018-12-19  3:48     ` zhangyi (F)
2018-12-18 19:51   ` Andreas Dilger
2018-12-19  4:47     ` zhangyi (F)
2018-12-19  4:55       ` Andreas Dilger
2018-12-18 14:25 ` [PATCH 1/2] ext4: fix race when setting the bitmap corrupted flag again Wang Shilong
2018-12-19  3:35   ` zhangyi (F) [this message]

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=3e2b94e8-935e-b4bb-f40d-19aa3cce1d24@huawei.com \
    --to=yi.zhang@huawei.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    --cc=tytso@mit.edu \
    --cc=wshilong@ddn.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).