[PATCH] NVMe: Reread partitions on metadata formats

Christoph Hellwig hch at infradead.org
Thu Jul 16 02:19:57 PDT 2015


On Wed, Jul 15, 2015 at 10:28:32PM +0000, Keith Busch wrote:
> Should we make it so a driver can register with blk-integrity prior to
> calling add_disk()? The other thread on this issue sounded like that'd
> be better and removes the extra driver complexity to call blk_reread_part
> or revalidate after add_disk.
> 
> Here's a patch for that and the resulting nvme driver. It works the same
> as today if registered after add_disk(), but safe to call prior. If
> called prior, add_disk() handles the queue and backing info settings
> for integrity, and adds the kobj.

This looks sensible to me as a quick fix for the issue.

In the lng run I'd prefer to just pass the integrity template
to add_disk (or rather an add_disk_integrity helper, for which
add_disk becomes a wrapper).

Also the way struct blk_integrity is used is a bit of a mess,
instead of passing it and then copying into a newly allocated
copy of it I'd rather move the kobj to struct gendisk and then
just have a pointer to the original template in struct gendisk.



More information about the Linux-nvme mailing list