nvme-multipath: fix io accounting on failover
[ Upstream commita2e4c5f5f6] There are io stats accounting that needs to be handled, so don't call blk_mq_end_request() directly. Use the existing nvme_end_req() helper that already handles everything. Fixes:d4d957b53d("nvme-multipath: support io stats on the mpath device") Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2488cd6624
commit
99d4f68a1d
@@ -422,7 +422,7 @@ static inline void __nvme_end_req(struct request *req)
|
||||
nvme_mpath_end_request(req);
|
||||
}
|
||||
|
||||
static inline void nvme_end_req(struct request *req)
|
||||
void nvme_end_req(struct request *req)
|
||||
{
|
||||
blk_status_t status = nvme_error_status(nvme_req(req)->status);
|
||||
|
||||
|
||||
@@ -118,7 +118,8 @@ void nvme_failover_req(struct request *req)
|
||||
blk_steal_bios(&ns->head->requeue_list, req);
|
||||
spin_unlock_irqrestore(&ns->head->requeue_lock, flags);
|
||||
|
||||
blk_mq_end_request(req, 0);
|
||||
nvme_req(req)->status = 0;
|
||||
nvme_end_req(req);
|
||||
kblockd_schedule_work(&ns->head->requeue_work);
|
||||
}
|
||||
|
||||
|
||||
@@ -767,6 +767,7 @@ static inline bool nvme_state_terminal(struct nvme_ctrl *ctrl)
|
||||
}
|
||||
}
|
||||
|
||||
void nvme_end_req(struct request *req);
|
||||
void nvme_complete_rq(struct request *req);
|
||||
void nvme_complete_batch_req(struct request *req);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user