]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
blk-mq: rename BLK_MQ_TAG_FAIL to BLK_MQ_NO_TAG
authorChristoph Hellwig <hch@lst.de>
Fri, 29 May 2020 13:53:11 +0000 (15:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 29 May 2020 16:23:25 +0000 (10:23 -0600)
To prepare for wider use of this constant give it a more applicable name.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-tag.c
block/blk-mq-tag.h
block/blk-mq.c

index 586c9d6e904ab8aade50bea050a5a973bb2a273e..c76ba4f90fa091ec429058e155b97e91c5c8b9ac 100644 (file)
@@ -111,7 +111,7 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)
        if (data->flags & BLK_MQ_REQ_RESERVED) {
                if (unlikely(!tags->nr_reserved_tags)) {
                        WARN_ON_ONCE(1);
-                       return BLK_MQ_TAG_FAIL;
+                       return BLK_MQ_NO_TAG;
                }
                bt = &tags->breserved_tags;
                tag_offset = 0;
@@ -125,7 +125,7 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)
                goto found_tag;
 
        if (data->flags & BLK_MQ_REQ_NOWAIT)
-               return BLK_MQ_TAG_FAIL;
+               return BLK_MQ_NO_TAG;
 
        ws = bt_wait_ptr(bt, data->hctx);
        do {
index 2b8321efb68206cce7a865e801bf5d980629a487..8a741752af8b9b0f9e9867c4103dfd9b4b95a9d0 100644 (file)
@@ -44,9 +44,9 @@ static inline struct sbq_wait_state *bt_wait_ptr(struct sbitmap_queue *bt,
 }
 
 enum {
-       BLK_MQ_TAG_FAIL         = -1U,
+       BLK_MQ_NO_TAG           = -1U,
        BLK_MQ_TAG_MIN          = 1,
-       BLK_MQ_TAG_MAX          = BLK_MQ_TAG_FAIL - 1,
+       BLK_MQ_TAG_MAX          = BLK_MQ_NO_TAG - 1,
 };
 
 extern bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *);
index b20ad88d2d707bb7c6030df527e3f4d0f1beaf44..cd2fd7f8524caa88164a99c3a5f99ab8a1b75d58 100644 (file)
@@ -386,7 +386,7 @@ static struct request *__blk_mq_alloc_request(struct blk_mq_alloc_data *data)
        }
 
        tag = blk_mq_get_tag(data);
-       if (tag == BLK_MQ_TAG_FAIL) {
+       if (tag == BLK_MQ_NO_TAG) {
                if (clear_ctx_on_error)
                        data->ctx = NULL;
                return NULL;