Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17ded320 authored by Jens Axboe's avatar Jens Axboe
Browse files

blk-mq: get rid of ->cmd_size in the hardware queue



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: default avatarJens Axboe <axboe@fb.com>
parent 35b489d3
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -1615,7 +1615,6 @@ static int blk_mq_init_hctx(struct request_queue *q,
	hctx->queue = q;
	hctx->queue = q;
	hctx->queue_num = hctx_idx;
	hctx->queue_num = hctx_idx;
	hctx->flags = set->flags;
	hctx->flags = set->flags;
	hctx->cmd_size = set->cmd_size;


	blk_mq_init_cpu_notifier(&hctx->cpu_notifier,
	blk_mq_init_cpu_notifier(&hctx->cpu_notifier,
					blk_mq_hctx_notify, hctx);
					blk_mq_hctx_notify, hctx);
+1 −2
Original line number Original line Diff line number Diff line
@@ -34,7 +34,6 @@ struct blk_mq_hw_ctx {
	unsigned long		flags;		/* BLK_MQ_F_* flags */
	unsigned long		flags;		/* BLK_MQ_F_* flags */


	struct request_queue	*queue;
	struct request_queue	*queue;
	unsigned int		queue_num;
	struct blk_flush_queue	*fq;
	struct blk_flush_queue	*fq;


	void			*driver_data;
	void			*driver_data;
@@ -54,7 +53,7 @@ struct blk_mq_hw_ctx {
	unsigned long		dispatched[BLK_MQ_MAX_DISPATCH_ORDER];
	unsigned long		dispatched[BLK_MQ_MAX_DISPATCH_ORDER];


	unsigned int		numa_node;
	unsigned int		numa_node;
	unsigned int		cmd_size;	/* per-request extra data */
	unsigned int		queue_num;


	atomic_t		nr_active;
	atomic_t		nr_active;