Skip to contentSkip to conversation

nbd: Consistently use request pointer in debug messages.

PATCH Applied [email protected] 3 participants 7 messages Jun 4, 2018 – Jun 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nbd: Consistently use request pointer in debug messages.

From: Kevin Vigor <[email protected]>

Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead.

---
 drivers/block/nbd.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/block/nbd.c +5 -5
index 3ed1ef8..b5afa11 100644
@@ -275,7 +275,7 @@ static void nbd_complete_rq(struct request *req)
 {
 	struct nbd_cmd *cmd = blk_mq_rq_to_pdu(req);
 
-	dev_dbg(nbd_to_dev(cmd->nbd), "request %p: %s\n", cmd,
+	dev_dbg(nbd_to_dev(cmd->nbd), "request %p: %s\n", req,
 		cmd->status ? "failed" : "done");
 
 	blk_mq_end_request(req, cmd->status);
@@ -482,7 +482,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
 	memcpy(request.handle, &tag, sizeof(tag));
 
 	dev_dbg(nbd_to_dev(nbd), "request %p: sending control (%s@%llu,%uB)\n",
-		cmd, nbdcmd_to_ascii(type),
+		req, nbdcmd_to_ascii(type),
 		(unsigned long long)blk_rq_pos(req) << 9, blk_rq_bytes(req));
 	result = sock_xmit(nbd, index, 1, &from,
 			(type == NBD_CMD_WRITE) ? MSG_MORE : 0, &sent);
@@ -518,7 +518,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
 			int flags = is_last ? 0 : MSG_MORE;
 
 			dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes data\n",
-				cmd, bvec.bv_len);
+				req, bvec.bv_len);
 			iov_iter_bvec(&from, ITER_BVEC | WRITE,
 				      &bvec, 1, bvec.bv_len);
 			if (skip) {
@@ -610,7 +610,7 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index)
 		return cmd;
 	}
 
-	dev_dbg(nbd_to_dev(nbd), "request %p: got reply\n", cmd);
+	dev_dbg(nbd_to_dev(nbd), "request %p: got reply\n", req);
 	if (rq_data_dir(req) != WRITE) {
 		struct req_iterator iter;
 		struct bio_vec bvec;
@@ -637,7 +637,7 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index)
 				return ERR_PTR(-EIO);
 			}
 			dev_dbg(nbd_to_dev(nbd), "request %p: got %d bytes data\n",
-				cmd, bvec.bv_len);
+				req, bvec.bv_len);
 		}
 	} else {
 		/* See the comment in nbd_queue_rq. */
Signature · 1 line
2.7.4
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Mon, Jun 04, 2018 at 10:40:12AM -0600, [email protected] wrote:

From: Kevin Vigor <[email protected]>

Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead.

Thanks,

Josef

maintainer
#2 lore raw
In reply to [email protected]
Quoted 5 lines · On 6/4/18 10:40 AM, [email protected] wrote:

From: Kevin Vigor <[email protected]>

Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead.

You're missing the Signed-off-by.

Signature · 1 line
Jens Axboe
maintainer
#3 lore raw
Quoted 9 lines · Jens Axboe
Quoted 5 lines · On 6/4/18 10:40 AM, [email protected] wrote:

From: Kevin Vigor <[email protected]>

Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead.

You're missing the Signed-off-by.

Blah sorry, still a little foggy,

Thanks,

Josef

maintainer
#4 lore raw
Quoted 8 lines · Josef Bacik
Quoted 7 lines · Jens Axboe
Quoted 5 lines · On 6/4/18 10:40 AM, [email protected] wrote:

From: Kevin Vigor <[email protected]>

Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead.

Quoted 6 lines
Quoted 2 lines

You're missing the Signed-off-by.

Blah sorry, still a little foggy,

Not you, Kevin :-)

Signature · 1 line
Jens Axboe
#5 lore raw

Sorry, also foggy from Josef's exploits.

Quoted 22 lines · Jens Axboe
Quoted 8 lines · Josef Bacik
Quoted 7 lines · Jens Axboe
Quoted 5 lines · On 6/4/18 10:40 AM, [email protected] wrote:

From: Kevin Vigor <[email protected]>

Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead.

Quoted 6 lines
Quoted 2 lines

You're missing the Signed-off-by.

Blah sorry, still a little foggy,

Not you, Kevin :-)

--
Jens Axboe

maintainer Applied
#6 lore raw
In reply to [email protected]
Quoted 5 lines · On 6/4/18 10:40 AM, [email protected] wrote:

From: Kevin Vigor <[email protected]>

Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead.

Applied, with the SOB added.

Signature · 1 line
Jens Axboe