Skip to content

Commit 55177ad

Browse files
johnpgarryaxboe
authored andcommitted
block: Make QUEUE_FLAG_x as an enum
This will allow us better keep in sync with blk_queue_flag_name[]. Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20240719112912.3830443-8-john.g.garry@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 793356d commit 55177ad

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

include/linux/blkdev.h

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -588,19 +588,22 @@ struct request_queue {
588588
};
589589

590590
/* Keep blk_queue_flag_name[] in sync with the definitions below */
591-
#define QUEUE_FLAG_DYING 1 /* queue being torn down */
592-
#define QUEUE_FLAG_NOMERGES 3 /* disable merge attempts */
593-
#define QUEUE_FLAG_SAME_COMP 4 /* complete on same CPU-group */
594-
#define QUEUE_FLAG_FAIL_IO 5 /* fake timeout */
595-
#define QUEUE_FLAG_NOXMERGES 9 /* No extended merges */
596-
#define QUEUE_FLAG_SAME_FORCE 12 /* force complete on same CPU */
597-
#define QUEUE_FLAG_INIT_DONE 14 /* queue is initialized */
598-
#define QUEUE_FLAG_STATS 20 /* track IO start and completion times */
599-
#define QUEUE_FLAG_REGISTERED 22 /* queue has been registered to a disk */
600-
#define QUEUE_FLAG_QUIESCED 24 /* queue has been quiesced */
601-
#define QUEUE_FLAG_RQ_ALLOC_TIME 27 /* record rq->alloc_time_ns */
602-
#define QUEUE_FLAG_HCTX_ACTIVE 28 /* at least one blk-mq hctx is active */
603-
#define QUEUE_FLAG_SQ_SCHED 30 /* single queue style io dispatch */
591+
enum {
592+
QUEUE_FLAG_DYING, /* queue being torn down */
593+
QUEUE_FLAG_NOMERGES, /* disable merge attempts */
594+
QUEUE_FLAG_SAME_COMP, /* complete on same CPU-group */
595+
QUEUE_FLAG_FAIL_IO, /* fake timeout */
596+
QUEUE_FLAG_NOXMERGES, /* No extended merges */
597+
QUEUE_FLAG_SAME_FORCE, /* force complete on same CPU */
598+
QUEUE_FLAG_INIT_DONE, /* queue is initialized */
599+
QUEUE_FLAG_STATS, /* track IO start and completion times */
600+
QUEUE_FLAG_REGISTERED, /* queue has been registered to a disk */
601+
QUEUE_FLAG_QUIESCED, /* queue has been quiesced */
602+
QUEUE_FLAG_RQ_ALLOC_TIME, /* record rq->alloc_time_ns */
603+
QUEUE_FLAG_HCTX_ACTIVE, /* at least one blk-mq hctx is active */
604+
QUEUE_FLAG_SQ_SCHED, /* single queue style io dispatch */
605+
QUEUE_FLAG_MAX
606+
};
604607

605608
#define QUEUE_FLAG_MQ_DEFAULT (1UL << QUEUE_FLAG_SAME_COMP)
606609

0 commit comments

Comments
 (0)