Skip to contentSkip to conversation

nvme: Fix setting logical block format when revalidating

PATCH New Keith Busch 4 participants 4 messages Oct 27, 2017 – Oct 30, 2017 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: Fix setting logical block format when revalidating

Revalidating the disk needs to set the logical block format and capacity, otherwise it can't figure out if the users modified anything about the namespace.

Fixes cdbff4f26bd9 ("nvme: remove nvme_revalidate_ns")
Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/nvme/host/core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/host/core.c +1 -0
index 5a14cc7f28ee..37f9039bb9ca 100644
@@ -1249,6 +1249,7 @@ static int nvme_revalidate_disk(struct gendisk *disk)
 		goto out;
 	}
 
+	__nvme_revalidate_disk(disk, id);
 	nvme_report_ns_ids(ctrl, ns->ns_id, id, eui64, nguid, &uuid);
 	if (!uuid_equal(&ns->uuid, &uuid) ||
 	    memcmp(&ns->nguid, &nguid, sizeof(ns->nguid)) ||
Signature · 1 line
2.13.6
#1 lore raw

PATCH 1/1 nvme: Fix setting logical block format when revalidating

Quoted 7 lines · Keith Busch

Revalidating the disk needs to set the logical block format and capacity, otherwise it can't figure out if the users modified anything about the namespace.

Fixes cdbff4f26bd9 ("nvme: remove nvme_revalidate_ns")
Signed-off-by Keith Busch <keith.busch at intel.com>

Looks fine to me:

Reviewed-by Christoph Hellwig <hch at lst.de>

Jens: can you pick this up directly before sending a block PR today?

maintainer Applied
#3 lore raw

PATCH 1/1 nvme: Fix setting logical block format when revalidating

In reply to Keith Busch
Quoted 3 lines · Keith Busch

Revalidating the disk needs to set the logical block format and capacity, otherwise it can't figure out if the users modified anything about the namespace.

Applied, thanks Keith.

Signature · 1 line
Jens Axboe