Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvme: flush scan work on passthrough commands

If a passthrough command causes the namespace inventory or capabilities
to change, flush the scan work that handles these changes so the driver
synchronizes with the user command's effects before returning the result
to user space.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Keith Busch and committed by
Jens Axboe
b04df85d 6623c5b3

+3 -1
+3 -1
drivers/nvme/host/core.c
··· 1404 1404 } 1405 1405 if (effects & NVME_CMD_EFFECTS_CCC) 1406 1406 nvme_init_identify(ctrl); 1407 - if (effects & (NVME_CMD_EFFECTS_NIC | NVME_CMD_EFFECTS_NCC)) 1407 + if (effects & (NVME_CMD_EFFECTS_NIC | NVME_CMD_EFFECTS_NCC)) { 1408 1408 nvme_queue_scan(ctrl); 1409 + flush_work(&ctrl->scan_work); 1410 + } 1409 1411 } 1410 1412 1411 1413 static int nvme_user_cmd(struct nvme_ctrl *ctrl, struct nvme_ns *ns,