]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvme: Fix setting logical block format when revalidating
authorKeith Busch <keith.busch@intel.com>
Fri, 27 Oct 2017 19:51:22 +0000 (13:51 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 30 Oct 2017 14:22:41 +0000 (08:22 -0600)
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")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c

index 5a14cc7f28ee75e930f8aca11e35443812720536..37f9039bb9cab29892f783ddb45a459809c3805c 100644 (file)
@@ -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)) ||