diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-07-22 14:23:55 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-07-22 14:23:55 -0600 |
commit | 7054133da39a82c1dc44ce796f13a7cb0d6a0b3c (patch) | |
tree | e3e619dfd62fac8b1a7c8b6220c81af5c7067c59 /drivers/nvme/host/multipath.c | |
parent | ec645dc96699ea6c37b6de86c84d7288ea9a4ddf (diff) | |
parent | aaeb7bb061be545251606f4d9c82d710ca2a7c8e (diff) |
Merge tag 'nvme-5.14-2021-07-22' of git://git.infradead.org/nvme into block-5.14block-5.14-2021-07-24
Pull NVMe fixes from Christoph:
"nvme fixes for Linux 5.14:
- tracing fix (Keith Busch)
- fix multipath head refcounting (Hannes Reinecke)
- Write Zeroes vs PI fix (me)
- drop a bogus WARN_ON (Zhihao Cheng)"
* tag 'nvme-5.14-2021-07-22' of git://git.infradead.org/nvme:
nvme: set the PRACT bit when using Write Zeroes with T10 PI
nvme: fix nvme_setup_command metadata trace event
nvme: fix refcounting imbalance when all paths are down
nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING
Diffstat (limited to 'drivers/nvme/host/multipath.c')
-rw-r--r-- | drivers/nvme/host/multipath.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 0ea5298469c3..3f32c5e86bfc 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -760,14 +760,21 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id) #endif } -void nvme_mpath_remove_disk(struct nvme_ns_head *head) +void nvme_mpath_shutdown_disk(struct nvme_ns_head *head) { if (!head->disk) return; + kblockd_schedule_work(&head->requeue_work); if (head->disk->flags & GENHD_FL_UP) { nvme_cdev_del(&head->cdev, &head->cdev_device); del_gendisk(head->disk); } +} + +void nvme_mpath_remove_disk(struct nvme_ns_head *head) +{ + if (!head->disk) + return; blk_set_queue_dying(head->disk->queue); /* make sure all pending bios are cleaned up */ kblockd_schedule_work(&head->requeue_work); |