]> git.baikalelectronics.ru Git - kernel.git/commit
bfq: Remove pointless bfq_init_rq() calls
authorJan Kara <jack@suse.cz>
Fri, 1 Apr 2022 10:27:47 +0000 (12:27 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Apr 2022 01:34:25 +0000 (19:34 -0600)
commita5108bc9351075b017e07e65cc1bc52dd447c069
treef26e30540412f7a10fd25710d1dc0880a4e4527d
parent211a76556f7756562b87c13b4489787bb2076460
bfq: Remove pointless bfq_init_rq() calls

We call bfq_init_rq() from request merging functions where requests we
get should have already gone through bfq_init_rq() during insert and
anyway we want to do anything only if the request is already tracked by
BFQ. So replace calls to bfq_init_rq() with RQ_BFQQ() instead to simply
skip requests untracked by BFQ. We move bfq_init_rq() call in
bfq_insert_request() a bit earlier to cover request merging and thus
can transfer FIFO position in case of a merge.

CC: stable@vger.kernel.org
Tested-by: "yukuai (C)" <yukuai3@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220401102752.8599-6-jack@suse.cz
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c