nvme: a couple of small fixes
cover nvme: a couple of small fixes
This is just a couple of small fixes, based on nvme 7.0 queue.
John Garry (2):
nvme: correct comment about nvme_ns_remove()
nvme: stop setting namespace gendisk device driver data
drivers/nvme/host/core.c | 7 ------- drivers/nvme/host/multipath.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-)
Signature · 1 line
2.43.5
PATCH 1/2 nvme: correct comment about nvme_ns_remove()
The comment in nvme_mpath_remove_disk() references nvme_remove_ns(), which should be nvme_ns_remove().
--- drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/multipath.c +1 -1
@@ -1300,7 +1300,7 @@ void nvme_mpath_remove_disk(struct nvme_ns_head *head)mutex_lock (&head->subsys->lock);/* * We are called when all paths have been removed, and at that point -* head->list is expected to be empty. However, nvme_remove_ns() and +* head->list is expected to be empty. However, nvme_ns_remove() and * nvme_init_ns_head() can run concurrently and so if head->delayed_ * removal_secs is configured, it is possible that by the time we reach * this point, head->list may no longer be empty. Therefore, we recheck
Signature · 1 line
2.43.5
Re: [PATCH 1/2] nvme: correct comment about nvme_ns_remove()
Quoted 4 lines · John Garry
The comment in
nvme_mpath_remove_disk()referencesnvme_remove_ns(), which should benvme_ns_remove().Signed-off-by John Garry <[email protected]>
Looks good:
PATCH 2/2 nvme: stop setting namespace gendisk device driver data
In reply to John GarrySince commit 1f4137e882c6 ("nvme: move passthrough logging attribute to head"), we stopped using the namespace to hold the passthrough logging enabled attribute. There is now nowhere now which looks up the gendisk dev driver data, so stop setting it.
Incidentally, it would have been better to set this before adding the disk.
--- drivers/nvme/host/core.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/nvme/host/core.c +0 -7
@@ -4181,13 +4181,6 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)nvme_mpath_add_disk (ns, info->anagrpid);nvme_fault_inject_init (&ns->fault_inject, ns->disk->disk_name); -/* -* Set ns->disk->device->driver_data to ns so we can access -* ns->head->passthru_err_log_enabled in -* nvme_io_passthru_err_log_enabled_[store | show](). -*/ -dev_set_drvdata (disk_to_dev (ns->disk), ns); -return ; out_cleanup_ns_from_list:
Signature · 1 line
2.43.5
Re: [PATCH 2/2] nvme: stop setting namespace gendisk device driver data
Quoted 7 lines · John Garry
Since commit
1f4137e882c6("nvme: move passthrough logging attribute to head"), we stopped using the namespace to hold the passthrough logging enabled attribute. There is now nowhere now which looks up the gendisk dev driver data, so stop setting it.Incidentally, it would have been better to set this before adding the disk.
I could also not find any other user of this drvdata field, so:
Quoted 1 line · John Garry
This is just a couple of small fixes, based on nvme 7.0 queue.
Thanks, applied to nvme-7.0.