blk-mq: get rid of ->cmd_size in the hardware queue
authorJens Axboe <axboe@fb.com>
Wed, 7 Jan 2015 17:44:04 +0000 (10:44 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 7 Jan 2015 17:44:04 +0000 (10:44 -0700)
We store it in the tag set, we don't need it in the hardware queue.
While removing cmd_size, place ->queue_num further down to avoid
a hole on 64-bit archs. It's not used in any fast paths, so we
can safely move it.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c
include/linux/blk-mq.h

index 1a41d7aefbd57fe923e25c02835db5971838632b..cbd2a55d69b80285f4a526b75ab0c006ed755c4f 100644 (file)
@@ -1615,7 +1615,6 @@ static int blk_mq_init_hctx(struct request_queue *q,
        hctx->queue = q;
        hctx->queue_num = hctx_idx;
        hctx->flags = set->flags;
-       hctx->cmd_size = set->cmd_size;
 
        blk_mq_init_cpu_notifier(&hctx->cpu_notifier,
                                        blk_mq_hctx_notify, hctx);
index 3b43f509432cd1cc340ec7040326f8beee2ef6f1..d0de259e92b204eefdfdaca818c68489cc3ee85c 100644 (file)
@@ -34,7 +34,6 @@ struct blk_mq_hw_ctx {
        unsigned long           flags;          /* BLK_MQ_F_* flags */
 
        struct request_queue    *queue;
-       unsigned int            queue_num;
        struct blk_flush_queue  *fq;
 
        void                    *driver_data;
@@ -54,7 +53,7 @@ struct blk_mq_hw_ctx {
        unsigned long           dispatched[BLK_MQ_MAX_DISPATCH_ORDER];
 
        unsigned int            numa_node;
-       unsigned int            cmd_size;       /* per-request extra data */
+       unsigned int            queue_num;
 
        atomic_t                nr_active;