summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/core.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2019-06-20 08:49:02 +0200
committerChristoph Hellwig <hch@lst.de>2019-06-21 11:15:50 +0200
commita3646451edd52ba238cbe4f618aaf6eb9bf9d60c (patch)
treebe62e299f7f760e27819a07a06ecd447e4977441 /drivers/nvme/host/core.c
parenta5448fdc469d67da99728a132229aba5fce8f67a (diff)
downloadlinux-a3646451edd52ba238cbe4f618aaf6eb9bf9d60c.tar.gz
linux-a3646451edd52ba238cbe4f618aaf6eb9bf9d60c.tar.bz2
linux-a3646451edd52ba238cbe4f618aaf6eb9bf9d60c.zip
nvme: prepare for fault injection into admin commands
Currenlty fault injection support for nvme only enables to inject errors into the commands submitted to I/O queues. In preparation for fault injection into the admin commands, this makes the helper functions independent of struct nvme_ns. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r--drivers/nvme/host/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 3b3960e0c31f..625605f8a0b5 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3336,7 +3336,7 @@ static int nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups);
nvme_mpath_add_disk(ns, id);
- nvme_fault_inject_init(ns);
+ nvme_fault_inject_init(&ns->fault_inject, ns->disk->disk_name);
kfree(id);
return 0;
@@ -3361,7 +3361,7 @@ static void nvme_ns_remove(struct nvme_ns *ns)
if (test_and_set_bit(NVME_NS_REMOVING, &ns->flags))
return;
- nvme_fault_inject_fini(ns);
+ nvme_fault_inject_fini(&ns->fault_inject);
mutex_lock(&ns->ctrl->subsys->lock);
list_del_rcu(&ns->siblings);