diff options
author | Christoph Hellwig <hch@lst.de> | 2016-04-26 13:51:59 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-05-02 09:09:24 -0600 |
commit | 5955be2144b3b56182e2175e7e3d2ddf27fb485d (patch) | |
tree | 32a52527211b8d0c2353f12bc53be31c8a76ed03 /drivers/nvme/host/nvme.h | |
parent | 92911a55d42084cd285250c275d9f238783638c2 (diff) | |
download | blackbird-op-linux-5955be2144b3b56182e2175e7e3d2ddf27fb485d.tar.gz blackbird-op-linux-5955be2144b3b56182e2175e7e3d2ddf27fb485d.zip |
nvme: move namespace scanning to core
Move the scan work item and surrounding code to the common code. For now
we need a new finish_scan method to allow the PCI driver to set the
irq affinity hints, but I have plans in the works to obsolete this as well.
Note that this moves the namespace scanning from nvme_wq to the system
workqueue, but as we don't rely on namespace scanning to finish from reset
or I/O this should be fine.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by Jon Derrick: <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 4135626a3d6f..9b63e719318a 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -108,6 +108,7 @@ struct nvme_ctrl { u32 vs; bool subsystem; unsigned long quirks; + struct work_struct scan_work; }; /* @@ -147,6 +148,7 @@ struct nvme_ctrl_ops { int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val); int (*reset_ctrl)(struct nvme_ctrl *ctrl); void (*free_ctrl)(struct nvme_ctrl *ctrl); + void (*post_scan)(struct nvme_ctrl *ctrl); }; static inline bool nvme_ctrl_ready(struct nvme_ctrl *ctrl) @@ -207,7 +209,7 @@ void nvme_uninit_ctrl(struct nvme_ctrl *ctrl); void nvme_put_ctrl(struct nvme_ctrl *ctrl); int nvme_init_identify(struct nvme_ctrl *ctrl); -void nvme_scan_namespaces(struct nvme_ctrl *ctrl); +void nvme_queue_scan(struct nvme_ctrl *ctrl); void nvme_remove_namespaces(struct nvme_ctrl *ctrl); void nvme_stop_queues(struct nvme_ctrl *ctrl); |