From: Ming Lei Date: Wed, 22 Oct 2014 00:30:30 +0000 (+0800) Subject: blk-merge: recaculate segment if it isn't less than max segments X-Git-Tag: omap-for-v3.19/fixes-not-urgent-part1~40^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76d8137a31139f0d69ecc4177497ad6b8d4f016c;p=pandora-kernel.git blk-merge: recaculate segment if it isn't less than max segments The problem is introduced by commit 764f612c6c3c231b(blk-merge: don't compute bi_phys_segments from bi_vcnt for cloned bio), and merge is needed if number of current segment isn't less than max segments. Strictly speaking, bio->bi_vcnt shouldn't be used here since it may not be accurate in cases of both cloned bio or bio cloned from, but bio_segments() is a bit expensive, and bi_vcnt is still the biggest number, so the approach should work. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- Reading git-diff-tree failed