aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-04-20 15:26:31 -0700
committerKent Overstreet <koverstreet@google.com>2013-04-20 17:57:41 -0700
commitbca97adaf522dff0e9ccf2c3f4150a1a7378932a (patch)
treebc9676fa2371d7fe98bc83d4d11dbc17dc38feaf /drivers/md/bcache
parent4f0fd955cd13bd94166099db7b31065479d884ed (diff)
downloadlinaro-lsk-bca97adaf522dff0e9ccf2c3f4150a1a7378932a.tar.gz
bcache: Hack around stuff that clones up to bi_max_vecs
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/io.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c
index f565512f6fa..b4c0e28a7cd 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);
}