Skip to contentSkip to conversation

block: print the real address of request in debugfs

RFC PATCH In review Guixin Liu 2 participants 3 messages Feb 8, 2025 – Feb 13, 2025 Block layer

lore
Share & tools
lore

Guixin Liu

author
#0 lore raw

RFC PATCH 1/1 block: print the real address of request in debugfs

Since only root user can access debugfs, for easier issue identification, use '%px' to print the request's real address in debugfs.

---
Hi,
I notice that block dont print the real address in
debugfs for a long time, I wonder what the community's concerns are, thanks, so this is a RFC patch. Best Regards,
Guixin Liu

 block/blk-mq-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq-debugfs.c +1 -1
index adf5f0697b6b..c430d931512f 100644
@@ -265,7 +265,7 @@ int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq)
 	BUILD_BUG_ON(ARRAY_SIZE(cmd_flag_name) != __REQ_NR_BITS);
 	BUILD_BUG_ON(ARRAY_SIZE(rqf_name) != __RQF_BITS);
 
-	seq_printf(m, "%p {.op=", rq);
+	seq_printf(m, "%px {.op=", rq);
 	if (strcmp(op_str, "UNKNOWN") == 0)
 		seq_printf(m, "%u", op);
 	else
Signature · 1 line
2.43.0
author
#1 lore raw

Gently ping...

Best Regards,

Guixin Liu

Quoted 29 lines · Guixin Liu

Since only root user can access debugfs, for easier issue identification, use '%px' to print the request's real address in debugfs.

---
Hi,
I notice that block dont print the real address in
debugfs for a long time, I wonder what the community's concerns are, thanks, so this is a RFC patch. Best Regards,
Guixin Liu

  block/blk-mq-debugfs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq-debugfs.c +1 -1
index adf5f0697b6b..c430d931512f 100644
@@ -265,7 +265,7 @@ int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq)
  	BUILD_BUG_ON(ARRAY_SIZE(cmd_flag_name) != __REQ_NR_BITS);
  	BUILD_BUG_ON(ARRAY_SIZE(rqf_name) != __RQF_BITS);
 
-	seq_printf(m, "%p {.op=", rq);
+	seq_printf(m, "%px {.op=", rq);
  	if (strcmp(op_str, "UNKNOWN") == 0)
  		seq_printf(m, "%u", op);
  	else
#2 lore raw

Hi,

Quoted 10 lines · Guixin Liu

Gently ping...

Best Regards,

Guixin Liu

Quoted 3 lines · Guixin Liu

Since only root user can access debugfs, for easier issue identification, use '%px' to print the request's real address in debugfs.

I search and find out that %p is introduced in the first commit:

320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism").

I think usually we should not print address by debugfs, and I don't see why this is needed here. For root user trying to debug, the tag information should be enough.

Just wonder maybe we can just remove this.

Thanks,
Kuai

Quoted 29 lines
Quoted 25 lines

---
Hi,
   I notice that block dont print the real address in debugfs for a long time, I wonder what the community's concerns are, thanks, so this is a RFC patch. Best Regards,
Guixin Liu

  block/blk-mq-debugfs.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-mq-debugfs.c +1 -1
index adf5f0697b6b..c430d931512f 100644
@@ -265,7 +265,7 @@ int __blk_mq_debugfs_rq_show(struct seq_file *m, 
 struct request *rq)
       BUILD_BUG_ON(ARRAY_SIZE(cmd_flag_name) != __REQ_NR_BITS);
       BUILD_BUG_ON(ARRAY_SIZE(rqf_name) != __RQF_BITS);
-    seq_printf(m, "%p {.op=", rq);
+    seq_printf(m, "%px {.op=", rq);
       if (strcmp(op_str, "UNKNOWN") == 0)
           seq_printf(m, "%u", op);
Quoted 1 line

      else

.