Skip to content

Commit 8c8f5c8

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: move the skip_tagset_quiesce flag to queue_limits
Move the skip_tagset_quiesce flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20240617060532.127975-26-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 9c1e42e commit 8c8f5c8

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

block/blk-mq-debugfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ static const char *const blk_queue_flag_name[] = {
9393
QUEUE_FLAG_NAME(RQ_ALLOC_TIME),
9494
QUEUE_FLAG_NAME(HCTX_ACTIVE),
9595
QUEUE_FLAG_NAME(SQ_SCHED),
96-
QUEUE_FLAG_NAME(SKIP_TAGSET_QUIESCE),
9796
};
9897
#undef QUEUE_FLAG_NAME
9998

drivers/nvme/host/core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4489,13 +4489,15 @@ int nvme_alloc_io_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set,
44894489
return ret;
44904490

44914491
if (ctrl->ops->flags & NVME_F_FABRICS) {
4492-
ctrl->connect_q = blk_mq_alloc_queue(set, NULL, NULL);
4492+
struct queue_limits lim = {
4493+
.features = BLK_FEAT_SKIP_TAGSET_QUIESCE,
4494+
};
4495+
4496+
ctrl->connect_q = blk_mq_alloc_queue(set, &lim, NULL);
44934497
if (IS_ERR(ctrl->connect_q)) {
44944498
ret = PTR_ERR(ctrl->connect_q);
44954499
goto out_free_tag_set;
44964500
}
4497-
blk_queue_flag_set(QUEUE_FLAG_SKIP_TAGSET_QUIESCE,
4498-
ctrl->connect_q);
44994501
}
45004502

45014503
ctrl->tagset = set;

include/linux/blkdev.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ enum {
322322

323323
/* supports PCI(e) p2p requests */
324324
BLK_FEAT_PCI_P2PDMA = (1u << 12),
325+
326+
/* skip this queue in blk_mq_(un)quiesce_tagset */
327+
BLK_FEAT_SKIP_TAGSET_QUIESCE = (1u << 13),
325328
};
326329

327330
/*
@@ -594,7 +597,6 @@ struct request_queue {
594597
#define QUEUE_FLAG_RQ_ALLOC_TIME 27 /* record rq->alloc_time_ns */
595598
#define QUEUE_FLAG_HCTX_ACTIVE 28 /* at least one blk-mq hctx is active */
596599
#define QUEUE_FLAG_SQ_SCHED 30 /* single queue style io dispatch */
597-
#define QUEUE_FLAG_SKIP_TAGSET_QUIESCE 31 /* quiesce_tagset skip the queue*/
598600

599601
#define QUEUE_FLAG_MQ_DEFAULT (1UL << QUEUE_FLAG_SAME_COMP)
600602

@@ -629,7 +631,7 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);
629631
#define blk_queue_registered(q) test_bit(QUEUE_FLAG_REGISTERED, &(q)->queue_flags)
630632
#define blk_queue_sq_sched(q) test_bit(QUEUE_FLAG_SQ_SCHED, &(q)->queue_flags)
631633
#define blk_queue_skip_tagset_quiesce(q) \
632-
test_bit(QUEUE_FLAG_SKIP_TAGSET_QUIESCE, &(q)->queue_flags)
634+
((q)->limits.features & BLK_FEAT_SKIP_TAGSET_QUIESCE)
633635

634636
extern void blk_set_pm_only(struct request_queue *q);
635637
extern void blk_clear_pm_only(struct request_queue *q);

0 commit comments

Comments
 (0)