]> git.baikalelectronics.ru Git - kernel.git/commit
block: blk-merge: try to make front segments in full size
authorMing Lei <ming.lei@redhat.com>
Mon, 18 Dec 2017 12:22:15 +0000 (20:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Jan 2018 16:18:00 +0000 (09:18 -0700)
commitd0a454df52c10e7617fcb5a172c3a300337e533d
tree63d4475d4de594b94b638c76269660102ac0b1b1
parent2958fac503a7f0f0565bc3794cff9367967c64fd
block: blk-merge: try to make front segments in full size

When merging one bvec into segment, if the bvec is too big
to merge, current policy is to move the whole bvec into another
new segment.

This patchset changes the policy into trying to maximize size of
front segments, that means in above situation, part of bvec
is merged into current segment, and the remainder is put
into next segment.

This patch prepares for support multipage bvec because
it can be quite common to see this case and we should try
to make front segments in full size.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-merge.c