Linux block layer
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Ming Lei <ming.lei@redhat.com>, Yu Kuai <yukuai1@huaweicloud.com>
Cc: jack@suse.cz, hare@suse.de, hch@infradead.org, axboe@kernel.dk,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	yi.zhang@huawei.com, yangerkun@huawei.com,
	Changhui Zhong <czhong@redhat.com>,
	"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH -next 0/2] block: fix scan partition for exclusively open device again
Date: Wed, 22 Mar 2023 12:00:42 +0800	[thread overview]
Message-ID: <28ee8ba9-fa42-d3bb-d3c4-44d7e77c64be@huaweicloud.com> (raw)
In-Reply-To: <ZBp4Ql08g5YvTDAA@ovpn-8-17.pek2.redhat.com>

Hi,

在 2023/03/22 11:38, Ming Lei 写道:
>>>>>> Hi Yu kuai,
>>>>>>
>>>>>> Looks the original issue starts to re-appear now with the two patches:
>>>>>>
>>>>>> https://lore.kernel.org/linux-block/20221130135344.2ul4cyfstfs3znxg@quack3/
>>>>>>
>>>>>>
>>>>>> And underlying disk partition and raid partition can be observed at the
>>>>>> same time.
>>>>>>
>>>>>> Can you take a look?
>>>>> Yes, thanks for the report. I realize that sda1 adn sdb1 is created
>>>>> while raid open sda and sdb excl, and I think this problem should exist
>>>>> before this patchset.
>>>>
>>>> Looks not reproduced before applying your two patches, that is
>>>> exactly what Jan
>>>> tried to fix with 36369f46e917 ("block: Do not reread partition
>>>> table on exclusively open device").
>>>
>>> Hi, Ming
>>>
>>> I just tried your test with this patchset reverted, and I can still
>>> reporduce the problem myself.
>>
>> Oops, I forgot to revert the first patch. It's right the problem can't
>> be reporduced.
>>>
>>> raid only open this device excl, and disk_scan_partitions is not called:
>>>
>>> md_import_device
>>>    blkdev_get_by_devo
>>>
>>> I need to add some debuginfo to figure out how GD_NEED_PART_SCAN is set
>>> for sda after raid is stopped. And this should explain why sda1 is
>>> created.
>>
>> I found how GD_NEED_PART_SCAN is set now, in patch 2, this is set before
>> bd_prepare_to_claim, so preciously faild part scan will still set this
>> bit, and following patch shold fix this problem:
> 
> Just run quick test, the issue won't be reproduced with your patch, and
> the change looks rational too,
> 
> Reviewed-by: Ming Lei <ming.lei@redhat.com>
> 

Thanks for the test and review, I just do some additional change to
clear GD_NEED_PART_SCAN, I will send a patch, can you take a look?

Kuai
> 
> Thanks,
> Ming
> 
> .
> 


  reply	other threads:[~2023-03-22  4:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  2:21 [PATCH -next 0/2] block: fix scan partition for exclusively open device again Yu Kuai
2023-02-17  2:21 ` [PATCH -next 1/2] block: Revert "block: Do not reread partition table on exclusively open device" Yu Kuai
2023-02-17 11:01   ` Jan Kara
2023-02-17  2:22 ` [PATCH -next 2/2] block: fix scan partition for exclusively open device again Yu Kuai
2023-02-17  7:29   ` Christoph Hellwig
2023-02-17 11:05   ` Jan Kara
2023-02-17 13:16 ` [PATCH -next 0/2] " Jens Axboe
2023-03-21 11:43 ` Ming Lei
2023-03-22  1:26   ` Yu Kuai
2023-03-22  1:34     ` Ming Lei
2023-03-22  2:02       ` Yu Kuai
2023-03-22  2:15         ` Yu Kuai
2023-03-22  3:38           ` Ming Lei
2023-03-22  4:00             ` Yu Kuai [this message]
2023-03-22  3:59   ` [PATCH] block: don't set GD_NEED_PART_SCAN if scan partition failed Yu Kuai
2023-03-22  7:58     ` Ming Lei
2023-03-22  9:12       ` Yu Kuai
2023-03-22  9:47       ` Jan Kara
2023-03-22 11:34         ` Ming Lei
2023-03-22 13:07           ` Jan Kara
2023-03-22 16:08             ` Ming Lei
2023-03-23 10:51               ` Jan Kara
2023-03-23 12:03                 ` Ming Lei
2023-03-22  9:52     ` Jan Kara
2023-03-23 23:59     ` Ming Lei
2023-04-06  3:42     ` Yu Kuai
2023-04-06 22:29       ` Jens Axboe
2023-04-07  2:01         ` Ming Lei
2023-04-07  2:42           ` Jens Axboe

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=28ee8ba9-fa42-d3bb-d3c4-44d7e77c64be@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=axboe@kernel.dk \
    --cc=czhong@redhat.com \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@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