From: Kent Overstreet Date: Fri, 7 Feb 2014 20:53:46 +0000 (-0700) Subject: block: Explicitly handle discard/write same segments X-Git-Tag: v3.14-rc3~22^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cb8850c9c4a7605f74f5c9c7ecadd0b02e87a25;p=pandora-kernel.git block: Explicitly handle discard/write same segments Immutable biovecs changed the way biovecs are interpreted - drivers no longer use bi_vcnt, they have to go by bi_iter.bi_size (to allow for using part of an existing segment without modifying it). This breaks with discards and write_same bios, since for those bi_size has nothing to do with segments in the biovec. So for now, we need a fairly gross hack - we fortunately know that there will never be more than one segment for the entire request, so we can special case discard/write_same. Signed-off-by: Kent Overstreet Tested-by: Hugh Dickins Signed-off-by: Jens Axboe --- Reading git-diff-tree failed