]> 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)
commitdd70f757fe5279b3f76895f9b53e6312428d80ac
tree63d4475d4de594b94b638c76269660102ac0b1b1
parentbefb554dba048654359a550fec0237b719277c8d
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