diff options
author | Christoph Hellwig <hch@lst.de> | 2024-03-04 17:04:51 +0300 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-03-04 19:24:56 +0300 |
commit | 8f03cfa117e06bd2d3ba7ed8bba70a3dda310cae (patch) | |
tree | 558668ef733a156c54b8ceb3654906b783069f33 /drivers/nvme | |
parent | 414c62e2ce5d93bfbdc12048530075dcea02cad8 (diff) | |
download | linux-8f03cfa117e06bd2d3ba7ed8bba70a3dda310cae.tar.xz |
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 40fab7c47eae..d356f3fa2cf8 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2159,7 +2159,8 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns, if (nvme_ns_head_multipath(ns->head)) { blk_mq_freeze_queue(ns->head->disk->queue); - nvme_update_disk_info(ns->ctrl, ns->head->disk, ns->head, id); + nvme_init_integrity(ns->head->disk, ns->head); + set_capacity_and_notify(ns->head->disk, get_capacity(ns->disk)); set_disk_ro(ns->head->disk, nvme_ns_is_readonly(ns, info)); nvme_mpath_revalidate_paths(ns); blk_stack_limits(&ns->head->disk->queue->limits, |