block: skip elevator fields init for non-elv queue
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 18 Oct 2021 20:37:27 +0000 (21:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 20:38:42 +0000 (14:38 -0600)
commit4f266f2be822eacd70aca2a7a53c4a111be79acb
tree9b5397b69c543d687cd5ec08848e2b5640fae8c6
parent2ff0682da6e09c1e0db63a2d2abcd4efb531c8db
block: skip elevator fields init for non-elv queue

Don't init rq->hash and rq->rb_node in blk_mq_rq_ctx_init() if there is
no elevator. Also, move some other initialisers that imply barriers to
the end, so the compiler is free to rearrange and optimise other the
rest of them.

note: fold in a change from Jens leaving queue_list unconditional, as
it might lead to problems otherwise.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c