]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: refactor command completion
authorChristoph Hellwig <hch@lst.de>
Tue, 18 Aug 2020 07:11:30 +0000 (09:11 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Aug 2020 23:14:28 +0000 (17:14 -0600)
commit56a6d9a89142c93ce0014569f907902e65ea85a9
treef59dba0c010e262307f7f91fb16f2250df177a85
parent601ac4c4fa628254a9ef9df8d11aadaf0388db47
nvme: refactor command completion

Lift all the code to decide the dispostition of a completed command
from nvme_complete_rq and nvme_failover_req into a new helper, which
returns an emum of the potential actions.  nvme_complete_rq then
just switches on those and calls the proper helper for the action.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
drivers/nvme/host/nvme.h