Skip to content

Commit 8f03cfa

Browse files
Christoph Hellwigkeithbusch
authored andcommitted
nvme: don't use nvme_update_disk_info for the multipath disk
Currently nvme_update_ns_info_block calls nvme_update_disk_info both for the namespace attached disk, and the multipath one (if it exists). This is very different from how other stacking drivers work, and leads to a lot of complexity. Switch to setting the disk capacity and initializing the integrity profile, and let blk_stack_limits which already is called just below deal with updating the other limits. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 414c62e commit 8f03cfa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,8 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns,
21592159

21602160
if (nvme_ns_head_multipath(ns->head)) {
21612161
blk_mq_freeze_queue(ns->head->disk->queue);
2162-
nvme_update_disk_info(ns->ctrl, ns->head->disk, ns->head, id);
2162+
nvme_init_integrity(ns->head->disk, ns->head);
2163+
set_capacity_and_notify(ns->head->disk, get_capacity(ns->disk));
21632164
set_disk_ro(ns->head->disk, nvme_ns_is_readonly(ns, info));
21642165
nvme_mpath_revalidate_paths(ns);
21652166
blk_stack_limits(&ns->head->disk->queue->limits,

0 commit comments

Comments
 (0)