Skip to content

Commit 04800fb

Browse files
lostandy26Christoph Hellwig
authored andcommitted
nvme: introduce nvme_sync_io_queues
Introduce sync io queues for some scenarios which just only need sync io queues not sync all queues. Signed-off-by: Chao Leng <lengchao@huawei.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 3821080 commit 04800fb

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

drivers/nvme/host/core.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,16 +4582,20 @@ void nvme_start_queues(struct nvme_ctrl *ctrl)
45824582
}
45834583
EXPORT_SYMBOL_GPL(nvme_start_queues);
45844584

4585-
4586-
void nvme_sync_queues(struct nvme_ctrl *ctrl)
4585+
void nvme_sync_io_queues(struct nvme_ctrl *ctrl)
45874586
{
45884587
struct nvme_ns *ns;
45894588

45904589
down_read(&ctrl->namespaces_rwsem);
45914590
list_for_each_entry(ns, &ctrl->namespaces, list)
45924591
blk_sync_queue(ns->queue);
45934592
up_read(&ctrl->namespaces_rwsem);
4593+
}
4594+
EXPORT_SYMBOL_GPL(nvme_sync_io_queues);
45944595

4596+
void nvme_sync_queues(struct nvme_ctrl *ctrl)
4597+
{
4598+
nvme_sync_io_queues(ctrl);
45954599
if (ctrl->admin_q)
45964600
blk_sync_queue(ctrl->admin_q);
45974601
}

drivers/nvme/host/nvme.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ void nvme_stop_queues(struct nvme_ctrl *ctrl);
602602
void nvme_start_queues(struct nvme_ctrl *ctrl);
603603
void nvme_kill_queues(struct nvme_ctrl *ctrl);
604604
void nvme_sync_queues(struct nvme_ctrl *ctrl);
605+
void nvme_sync_io_queues(struct nvme_ctrl *ctrl);
605606
void nvme_unfreeze(struct nvme_ctrl *ctrl);
606607
void nvme_wait_freeze(struct nvme_ctrl *ctrl);
607608
int nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout);

0 commit comments

Comments
 (0)