From: Hou Tao <houtao1@huawei.com>
To: <linux-block@vger.kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH v2] blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags
Date: Tue, 28 Apr 2020 09:54:56 +0800 [thread overview]
Message-ID: <20200428015456.1194-1-houtao1@huawei.com> (raw)
In-Reply-To: <e1e28027-2dac-3ae3-21c1-9ba779a5a566@acm.org>
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
next prev parent reply other threads:[~2020-04-28 1:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Hou Tao [this message]
2020-05-25 6:32 ` [PATCH v2] " Hou Tao
2020-06-29 4:31 ` Hou Tao
2020-06-29 13:45 ` [PATCH] " Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200428015456.1194-1-houtao1@huawei.com \
--to=houtao1@huawei.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).