From: Johannes Thumshirn <jthumshirn@suse.de>
To: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>, Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH 2/2] bdev: Refresh bdev size for disks without partitioning
Date: Mon, 21 Oct 2019 11:36:52 +0200 [thread overview]
Message-ID: <3eca5fff-1b55-13ba-3176-2d8b24e46ed0@suse.de> (raw)
In-Reply-To: <f77bed8f-16a7-dc96-d006-41c34e86eff0@cloud.ionos.com>
On 21/10/2019 11:27, Guoqing Jiang wrote:
>>>> static void bdev_disk_changed(struct block_device *bdev, bool
>>>> invalidate)
>>>> {
>>>> - if (invalidate)
>>>> - invalidate_partitions(bdev->bd_disk, bdev);
>>>> - else
>>>> - rescan_partitions(bdev->bd_disk, bdev);
>>>> + if (disk_part_scan_enabled(bdev->bd_disk)) {
>>>> + if (invalidate)
>>>> + invalidate_partitions(bdev->bd_disk, bdev);
>>>> + else
>>>> + rescan_partitions(bdev->bd_disk, bdev);
>>> Maybe use the new common helper to replace above.
>> What do you mean exactly? Because there's only this place that has the
>> code
>> pattern here...
>
> The above looks same as the new function.
The above is changed in the new bdev_disk_changed() function. Patch 1/2
factors out the pattern and this patch changes the behaviour
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@suse.de +49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
next prev parent reply other threads:[~2019-10-21 9:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 8:37 [PATCH 0/2] bdev: Refresh bdev size for disks without partitioning Jan Kara
2019-10-21 8:37 ` [PATCH 1/2] bdev: Factor out bdev revalidation into a common helper Jan Kara
2019-10-22 7:58 ` Damien Le Moal
2019-10-22 9:15 ` Jan Kara
2019-10-22 9:31 ` Damien Le Moal
2019-10-21 8:38 ` [PATCH 2/2] bdev: Refresh bdev size for disks without partitioning Jan Kara
2019-10-21 8:49 ` Guoqing Jiang
2019-10-21 9:12 ` Jan Kara
2019-10-21 9:27 ` Guoqing Jiang
2019-10-21 9:36 ` Johannes Thumshirn [this message]
2019-10-21 9:38 ` Guoqing Jiang
2019-10-21 9:40 ` Jan Kara
2019-10-21 9:43 ` Guoqing Jiang
2019-11-03 14:53 ` [PATCH 0/2] " Jens Axboe
2019-11-04 8:08 ` Jan Kara
2019-11-04 23:48 ` Christoph Hellwig
2019-11-05 8:59 ` Jan Kara
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=3eca5fff-1b55-13ba-3176-2d8b24e46ed0@suse.de \
--to=jthumshirn@suse.de \
--cc=axboe@kernel.dk \
--cc=guoqing.jiang@cloud.ionos.com \
--cc=jack@suse.cz \
--cc=linux-block@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;
as well as URLs for NNTP newsgroup(s).