Browse Source

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

[ Upstream commit bfe373f608 ]

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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Hou Tao 2 years ago
committed by Greg Kroah-Hartman
parent
commit
c3adbd37c0
  1. 3
      block/blk-mq-debugfs.c
  2. 1
      include/linux/blkdev.h

3
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

1
include/linux/blkdev.h

@ -592,6 +592,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 */

Loading…
Cancel
Save