From: Kent Overstreet Date: Sat, 20 Apr 2013 22:26:31 +0000 (-0700) Subject: bcache: Hack around stuff that clones up to bi_max_vecs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bca97adaf522dff0e9ccf2c3f4150a1a7378932a;p=linux-beck.git bcache: Hack around stuff that clones up to bi_max_vecs Signed-off-by: Kent Overstreet --- diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c index f565512f6fac..b4c0e28a7cd1 100644 --- a/drivers/md/bcache/io.c +++ b/drivers/md/bcache/io.c @@ -38,6 +38,15 @@ static void bch_generic_make_request_hack(struct bio *bio) bio = clone; } + /* + * Hack, since drivers that clone bios clone up to bi_max_vecs, but our + * bios might have had more than that (before we split them per device + * limitations). + * + * To be taken out once immutable bvec stuff is in. + */ + bio->bi_max_vecs = bio->bi_vcnt; + generic_make_request(bio); }