Skip to contentSkip to conversation

blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags

PATCH Applied Hou Tao 3 participants 6 messages Apr 27, 2020 – Jun 29, 2020 Block layer

lore
Share & tools
lore

Hou Tao

author
#0 lore raw

PATCH 1/1 blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags

Else there may be magic numbers in /sys/kernel/debug/block/*/state.

---
 block/blk-mq-debugfs.c | 3 +++
 include/linux/blkdev.h | 1 +
 2 files changed, 4 insertions(+)
block/blk-mq-debugfs.c +3 -0
index 7a79db81a63f..49fdbc8a025f 100644
@@ -125,6 +125,9 @@ static const char *const blk_queue_flag_name[] = {
 	QUEUE_FLAG_NAME(REGISTERED),
 	QUEUE_FLAG_NAME(SCSI_PASSTHROUGH),
 	QUEUE_FLAG_NAME(QUIESCED),
+	QUEUE_FLAG_NAME(PCI_P2PDMA),
+	QUEUE_FLAG_NAME(ZONE_RESETALL),
+	QUEUE_FLAG_NAME(RQ_ALLOC_TIME),
 };
 #undef QUEUE_FLAG_NAME
 
include/linux/blkdev.h +1 -0
index 32868fbedc9e..d56ef0def78b 100644
@@ -585,6 +585,7 @@ struct request_queue {
 	u64			write_hints[BLK_MAX_WRITE_HINTS];
 };
 
+/* Need to update blk_queue_flag_name[] accordingly */
 #define QUEUE_FLAG_STOPPED	0	/* queue is stopped */
 #define QUEUE_FLAG_DYING	1	/* queue being torn down */
 #define QUEUE_FLAG_NOMERGES     3	/* disable merge attempts */
Signature · 1 line
2.21.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 27 lines · Hou Tao

Else there may be magic numbers in /sys/kernel/debug/block/*/state.

---
 block/blk-mq-debugfs.c | 3 +++
 include/linux/blkdev.h | 1 +
 2 files changed, 4 insertions(+)
block/blk-mq-debugfs.c +3 -0
index 7a79db81a63f..49fdbc8a025f 100644
@@ -125,6 +125,9 @@ static const char *const blk_queue_flag_name[] = {
 	QUEUE_FLAG_NAME(REGISTERED),
 	QUEUE_FLAG_NAME(SCSI_PASSTHROUGH),
 	QUEUE_FLAG_NAME(QUIESCED),
+	QUEUE_FLAG_NAME(PCI_P2PDMA),
+	QUEUE_FLAG_NAME(ZONE_RESETALL),
+	QUEUE_FLAG_NAME(RQ_ALLOC_TIME),
 };
 #undef QUEUE_FLAG_NAME
 
include/linux/blkdev.h +0 -0
index 32868fbedc9e..d56ef0def78b 100644

include/linux/blkdev.h struct request_queue { · line 591

Quoted 7 lines
include/linux/blkdev.h +1 -0
@@ -585,6 +585,7 @@ struct request_queue {
 	u64			write_hints[BLK_MAX_WRITE_HINTS];
 };
 
+/* Need to update blk_queue_flag_name[] accordingly */
 #define QUEUE_FLAG_STOPPED	0	/* queue is stopped */
 #define QUEUE_FLAG_DYING	1	/* queue being torn down */
 #define QUEUE_FLAG_NOMERGES     3	/* disable merge attempts */

Changing "Need to update blk_queue_flag_name[] accordingly" into "Keep blk_queue_flag_name[] in sync with the definitions below" probably would be more clear. Anyway:

author
#2 lore raw

PATCH v2 1/1 blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags

Else there may be magic numbers in /sys/kernel/debug/block/*/state.

---
v2: comments update as suggested by Bart

---
 block/blk-mq-debugfs.c | 3 +++
 include/linux/blkdev.h | 1 +
 2 files changed, 4 insertions(+)
block/blk-mq-debugfs.c +3 -0
index 7a79db81a63f..49fdbc8a025f 100644
@@ -125,6 +125,9 @@ static const char *const blk_queue_flag_name[] = {
 	QUEUE_FLAG_NAME(REGISTERED),
 	QUEUE_FLAG_NAME(SCSI_PASSTHROUGH),
 	QUEUE_FLAG_NAME(QUIESCED),
+	QUEUE_FLAG_NAME(PCI_P2PDMA),
+	QUEUE_FLAG_NAME(ZONE_RESETALL),
+	QUEUE_FLAG_NAME(RQ_ALLOC_TIME),
 };
 #undef QUEUE_FLAG_NAME
 
include/linux/blkdev.h +1 -0
index 32868fbedc9e..02809e4dd661 100644
@@ -585,6 +585,7 @@ struct request_queue {
 	u64			write_hints[BLK_MAX_WRITE_HINTS];
 };
 
+/* Keep blk_queue_flag_name[] in sync with the definitions below */
 #define QUEUE_FLAG_STOPPED	0	/* queue is stopped */
 #define QUEUE_FLAG_DYING	1	/* queue being torn down */
 #define QUEUE_FLAG_NOMERGES     3	/* disable merge attempts */
Signature · 1 line
2.21.1
author
#3 lore raw

ping ?

Quoted 38 lines · Hou Tao

Else there may be magic numbers in /sys/kernel/debug/block/*/state.

---
v2: comments update as suggested by Bart

---
 block/blk-mq-debugfs.c | 3 +++
 include/linux/blkdev.h | 1 +
 2 files changed, 4 insertions(+)
block/blk-mq-debugfs.c +3 -0
index 7a79db81a63f..49fdbc8a025f 100644
@@ -125,6 +125,9 @@ static const char *const blk_queue_flag_name[] = {
 	QUEUE_FLAG_NAME(REGISTERED),
 	QUEUE_FLAG_NAME(SCSI_PASSTHROUGH),
 	QUEUE_FLAG_NAME(QUIESCED),
+	QUEUE_FLAG_NAME(PCI_P2PDMA),
+	QUEUE_FLAG_NAME(ZONE_RESETALL),
+	QUEUE_FLAG_NAME(RQ_ALLOC_TIME),
 };
 #undef QUEUE_FLAG_NAME
 
include/linux/blkdev.h +1 -0
index 32868fbedc9e..02809e4dd661 100644
@@ -585,6 +585,7 @@ struct request_queue {
 	u64			write_hints[BLK_MAX_WRITE_HINTS];
 };
 
+/* Keep blk_queue_flag_name[] in sync with the definitions below */
 #define QUEUE_FLAG_STOPPED	0	/* queue is stopped */
 #define QUEUE_FLAG_DYING	1	/* queue being torn down */
 #define QUEUE_FLAG_NOMERGES     3	/* disable merge attempts */
author
#4 lore raw

ping again ?

Quoted 45 lines · Hou Tao

ping ?

Quoted 31 lines · Hou Tao

Else there may be magic numbers in /sys/kernel/debug/block/*/state.

---
v2: comments update as suggested by Bart

---
 block/blk-mq-debugfs.c | 3 +++
 include/linux/blkdev.h | 1 +
 2 files changed, 4 insertions(+)
block/blk-mq-debugfs.c +3 -0
index 7a79db81a63f..49fdbc8a025f 100644
@@ -125,6 +125,9 @@ static const char *const blk_queue_flag_name[] = {
 	QUEUE_FLAG_NAME(REGISTERED),
 	QUEUE_FLAG_NAME(SCSI_PASSTHROUGH),
 	QUEUE_FLAG_NAME(QUIESCED),
+	QUEUE_FLAG_NAME(PCI_P2PDMA),
+	QUEUE_FLAG_NAME(ZONE_RESETALL),
+	QUEUE_FLAG_NAME(RQ_ALLOC_TIME),
 };
 #undef QUEUE_FLAG_NAME
 
include/linux/blkdev.h +0 -0
index 32868fbedc9e..02809e4dd661 100644

include/linux/blkdev.h struct request_queue { · line 591

Quoted 7 lines
include/linux/blkdev.h +1 -0
@@ -585,6 +585,7 @@ struct request_queue {
 	u64			write_hints[BLK_MAX_WRITE_HINTS];
 };
 
+/* Keep blk_queue_flag_name[] in sync with the definitions below */
 #define QUEUE_FLAG_STOPPED	0	/* queue is stopped */
 #define QUEUE_FLAG_DYING	1	/* queue being torn down */
 #define QUEUE_FLAG_NOMERGES     3	/* disable merge attempts */

.

maintainer Applied
#5 lore raw
In reply to Hou Tao
Quoted 1 line · Hou Tao

Else there may be magic numbers in /sys/kernel/debug/block/*/state.

Applied, thanks.

Signature · 1 line
Jens Axboe