Skip to content

Commit 2517b7b

Browse files
committed
nvme: fix multipath batched completion accounting
jira LE-2015 Rebuild_History Non-Buildable kernel-5.14.0-427.42.1.el9_4 commit-author Keith Busch <kbusch@kernel.org> commit 2fe7b42 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-5.14.0-427.42.1.el9_4/2fe7b422.failed Batched completions were missing the io stats accounting and bio trace events. Move the common code to a helper and call it from the batched and non-batched functions. Fixes: d4d957b ("nvme-multipath: support io stats on the mpath device") Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Keith Busch <kbusch@kernel.org> (cherry picked from commit 2fe7b42) Signed-off-by: Jonathan Maple <jmaple@ciq.com> # Conflicts: # drivers/nvme/host/core.c
1 parent 8948eeb commit 2517b7b

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
nvme: fix multipath batched completion accounting
2+
3+
jira LE-2015
4+
Rebuild_History Non-Buildable kernel-5.14.0-427.42.1.el9_4
5+
commit-author Keith Busch <kbusch@kernel.org>
6+
commit 2fe7b422460d14b33027d8770f7be8d26bcb2639
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-5.14.0-427.42.1.el9_4/2fe7b422.failed
10+
11+
Batched completions were missing the io stats accounting and bio trace
12+
events. Move the common code to a helper and call it from the batched
13+
and non-batched functions.
14+
15+
Fixes: d4d957b53d91ee ("nvme-multipath: support io stats on the mpath device")
16+
Reviewed-by: Christoph Hellwig <hch@lst.de>
17+
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
18+
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
19+
Reviewed-by: Hannes Reinecke <hare@suse.de>
20+
Signed-off-by: Keith Busch <kbusch@kernel.org>
21+
(cherry picked from commit 2fe7b422460d14b33027d8770f7be8d26bcb2639)
22+
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
23+
24+
# Conflicts:
25+
# drivers/nvme/host/core.c
26+
diff --cc drivers/nvme/host/core.c
27+
index 93dd6cfe54ab,79cdd34dfa18..000000000000
28+
--- a/drivers/nvme/host/core.c
29+
+++ b/drivers/nvme/host/core.c
30+
@@@ -377,21 -406,33 +377,39 @@@ static inline enum nvme_disposition nvm
31+
static inline void nvme_end_req_zoned(struct request *req)
32+
{
33+
if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) &&
34+
- req_op(req) == REQ_OP_ZONE_APPEND) {
35+
- struct nvme_ns *ns = req->q->queuedata;
36+
-
37+
- req->__sector = nvme_lba_to_sect(ns->head,
38+
+ req_op(req) == REQ_OP_ZONE_APPEND)
39+
+ req->__sector = nvme_lba_to_sect(req->q->queuedata,
40+
le64_to_cpu(nvme_req(req)->result.u64));
41+
- }
42+
}
43+
44+
+ static inline void __nvme_end_req(struct request *req)
45+
+ {
46+
+ nvme_end_req_zoned(req);
47+
+ nvme_trace_bio_complete(req);
48+
+ if (req->cmd_flags & REQ_NVME_MPATH)
49+
+ nvme_mpath_end_request(req);
50+
+ }
51+
+
52+
static inline void nvme_end_req(struct request *req)
53+
{
54+
blk_status_t status = nvme_error_status(nvme_req(req)->status);
55+
56+
++<<<<<<< HEAD
57+
+ if (unlikely(nvme_req(req)->status && !(req->rq_flags & RQF_QUIET)))
58+
+ nvme_log_error(req);
59+
+ nvme_end_req_zoned(req);
60+
+ nvme_trace_bio_complete(req);
61+
+ if (req->cmd_flags & REQ_NVME_MPATH)
62+
+ nvme_mpath_end_request(req);
63+
++=======
64+
+ if (unlikely(nvme_req(req)->status && !(req->rq_flags & RQF_QUIET))) {
65+
+ if (blk_rq_is_passthrough(req))
66+
+ nvme_log_err_passthru(req);
67+
+ else
68+
+ nvme_log_error(req);
69+
+ }
70+
+ __nvme_end_req(req);
71+
++>>>>>>> 2fe7b422460d (nvme: fix multipath batched completion accounting)
72+
blk_mq_end_request(req, status);
73+
}
74+
75+
* Unmerged path drivers/nvme/host/core.c

0 commit comments

Comments
 (0)