]> git.baikalelectronics.ru Git - kernel.git/commit
block: Add a new helper to attempt to merge a bio
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Fri, 28 Aug 2020 02:52:56 +0000 (10:52 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Sep 2020 22:49:26 +0000 (16:49 -0600)
commit01a73d01ca26f054d824f062b8f392ad65a5c8ef
treeb19837e1b64f7d96bced5a4d6994b185d7e0f81d
parent736889d8868b1dc12efa5274155277e138538f42
block: Add a new helper to attempt to merge a bio

There are lots of duplicated code when trying to merge a bio from
plug list and sw queue, we can introduce a new helper to attempt
to merge a bio, which can simplify the blk_bio_list_merge()
and blk_attempt_plug_merge().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c
block/blk-mq-sched.c
block/blk.h