Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
@ 2020-04-27 13:34 Hou Tao
  2020-04-27 17:30 ` Bart Van Assche
  2020-06-29 13:45 ` [PATCH] " Jens Axboe
  0 siblings, 2 replies; 6+ messages in thread
From: Hou Tao @ 2020-04-27 13:34 UTC (permalink / raw)
  To: linux-block; +Cc: Jens Axboe, Tejun Heo, Chaitanya Kulkarni

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

Signed-off-by: Hou Tao <houtao1@huawei.com>
---
 block/blk-mq-debugfs.c | 3 +++
 include/linux/blkdev.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 7a79db81a63f..49fdbc8a025f 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -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
 
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 32868fbedc9e..d56ef0def78b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -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 */
-- 
2.21.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
  2020-04-27 13:34 [PATCH] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags Hou Tao
@ 2020-04-27 17:30 ` Bart Van Assche
  2020-04-28  1:54   ` [PATCH v2] " Hou Tao
  2020-06-29 13:45 ` [PATCH] " Jens Axboe
  1 sibling, 1 reply; 6+ messages in thread
From: Bart Van Assche @ 2020-04-27 17:30 UTC (permalink / raw)
  To: Hou Tao, linux-block; +Cc: Jens Axboe, Tejun Heo, Chaitanya Kulkarni

On 2020-04-27 06:34, Hou Tao wrote:
> Else there may be magic numbers in /sys/kernel/debug/block/*/state.
> 
> Signed-off-by: Hou Tao <houtao1@huawei.com>
> ---
>  block/blk-mq-debugfs.c | 3 +++
>  include/linux/blkdev.h | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> index 7a79db81a63f..49fdbc8a025f 100644
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -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
>  
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 32868fbedc9e..d56ef0def78b 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -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:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
  2020-04-27 17:30 ` Bart Van Assche
@ 2020-04-28  1:54   ` Hou Tao
  2020-05-25  6:32     ` Hou Tao
  0 siblings, 1 reply; 6+ messages in thread
From: Hou Tao @ 2020-04-28  1:54 UTC (permalink / raw)
  To: linux-block; +Cc: Jens Axboe

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

Signed-off-by: Hou Tao <houtao1@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
---
v2: comments update as suggested by Bart
---
 block/blk-mq-debugfs.c | 3 +++
 include/linux/blkdev.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 7a79db81a63f..49fdbc8a025f 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -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
 
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 32868fbedc9e..02809e4dd661 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -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 */
-- 
2.21.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
  2020-04-28  1:54   ` [PATCH v2] " Hou Tao
@ 2020-05-25  6:32     ` Hou Tao
  2020-06-29  4:31       ` Hou Tao
  0 siblings, 1 reply; 6+ messages in thread
From: Hou Tao @ 2020-05-25  6:32 UTC (permalink / raw)
  To: linux-block, Jens Axboe; +Cc: Bart Van Assche

ping ?

On 2020/4/28 9:54, Hou Tao wrote:
> Else there may be magic numbers in /sys/kernel/debug/block/*/state.
> 
> Signed-off-by: Hou Tao <houtao1@huawei.com>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> ---
> v2: comments update as suggested by Bart
> ---
>  block/blk-mq-debugfs.c | 3 +++
>  include/linux/blkdev.h | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> index 7a79db81a63f..49fdbc8a025f 100644
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -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
>  
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 32868fbedc9e..02809e4dd661 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -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 */
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
  2020-05-25  6:32     ` Hou Tao
@ 2020-06-29  4:31       ` Hou Tao
  0 siblings, 0 replies; 6+ messages in thread
From: Hou Tao @ 2020-06-29  4:31 UTC (permalink / raw)
  To: linux-block, Jens Axboe; +Cc: Bart Van Assche

ping again ?

On 2020/5/25 14:32, Hou Tao wrote:
> ping ?
> 
> On 2020/4/28 9:54, Hou Tao wrote:
>> Else there may be magic numbers in /sys/kernel/debug/block/*/state.
>>
>> Signed-off-by: Hou Tao <houtao1@huawei.com>
>> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
>> ---
>> v2: comments update as suggested by Bart
>> ---
>>  block/blk-mq-debugfs.c | 3 +++
>>  include/linux/blkdev.h | 1 +
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
>> index 7a79db81a63f..49fdbc8a025f 100644
>> --- a/block/blk-mq-debugfs.c
>> +++ b/block/blk-mq-debugfs.c
>> @@ -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
>>  
>> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
>> index 32868fbedc9e..02809e4dd661 100644
>> --- a/include/linux/blkdev.h
>> +++ b/include/linux/blkdev.h
>> @@ -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 */
>>
> 
> 
> .
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
  2020-04-27 13:34 [PATCH] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags Hou Tao
  2020-04-27 17:30 ` Bart Van Assche
@ 2020-06-29 13:45 ` Jens Axboe
  1 sibling, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2020-06-29 13:45 UTC (permalink / raw)
  To: Hou Tao, linux-block; +Cc: Tejun Heo, Chaitanya Kulkarni

On 4/27/20 7:34 AM, Hou Tao wrote:
> Else there may be magic numbers in /sys/kernel/debug/block/*/state.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 13:34 [PATCH] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags Hou Tao
2020-04-27 17:30 ` Bart Van Assche
2020-04-28  1:54   ` [PATCH v2] " Hou Tao
2020-05-25  6:32     ` Hou Tao
2020-06-29  4:31       ` Hou Tao
2020-06-29 13:45 ` [PATCH] " Jens Axboe

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git