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

Christoph Hellwig
2019-11-14T14:31:31Z

On Thu, Nov 14, 2019 at 03:07:16PM +0100, Jan Kara wrote:
> I'd just note that e.g. drivers/scsi/sr.c or drivers/scsi/sd.c already call
> revalidate_disk() on device open so it seems a bit stupid to call it again
> just a bit later. But that's not really a new thing, this patch just makes
> it universal.

That whole area is a bit of a mess, including how the whole
->revalidate_disk callback works, and how we have a complicated events
mechanism, but then also md as the only remaining user of the legacy
->media_changed method. I have a few idea on how to sort some of that
out, but it's going to take a while.