Re: [PATCH 4/7] block: fix bdev_disk_changed for non-partitioned devices

Hannes Reinecke
2019-11-15T10:07:52Z

On 11/14/19 3:34 PM, Christoph Hellwig wrote:
> We still have to set the capacity to 0 if invalidating or call
> revalidate_disk if not even if the disk has no partitions. Fix
> that by merging rescan_partitions into bdev_disk_changed and just
> stubbing out blk_add_partitions and blk_drop_partitions for
> non-partitioned devices.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Jan Kara <jack@suse.cz>
> ---
> block/ioctl.c | 6 ++----
> block/partition-generic.c | 5 +++++
> fs/block_dev.c | 27 ++++++++-------------------
> include/linux/genhd.h | 1 +
> 4 files changed, 16 insertions(+), 23 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer