]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bcache: Hack around stuff that clones up to bi_max_vecs
authorKent Overstreet <koverstreet@google.com>
Sat, 20 Apr 2013 22:26:31 +0000 (15:26 -0700)
committerKent Overstreet <koverstreet@google.com>
Sun, 21 Apr 2013 00:57:41 +0000 (17:57 -0700)
Signed-off-by: Kent Overstreet <koverstreet@google.com>
drivers/md/bcache/io.c

index f565512f6fac23eb87e84086199e53dcb3dfe74d..b4c0e28a7cd16d65f31184143dba49aaf22d55d2 100644 (file)
@@ -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);
 }