We are using your bcache-testing branch.

>From 20ad8cfb8047df2d09a5a960610f02c555a31a4f Mon Sep 17 00:00:00 2001
From: Jack Wang <[email protected]>
Date: Tue, 16 Apr 2013 14:59:04 +0200
Subject: [PATCH] limit the max sectors in bcache to fix the make request bug
 in raid10
During test bcache with raid1+0, we saw a lot of complain as below:
[ 2766.555172] md/raid0:md400: make_request bug: can't convert block
across chunks or bigger than 512k 953328 144

when the using dd or fio with bigger blocksize like 512k, limited the
bio_max_sectors resolve this issue.

Reported-by: Michael Balser <[email protected]>
Signed-off-by: Jack Wang <[email protected]>
Tested-by: Dongsu Park <[email protected]>
---
 drivers/md/bcache/io.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c
index 9b63065..c5c36f7 100644
--- a/drivers/md/bcache/io.c
+++ b/drivers/md/bcache/io.c
@@ -181,7 +181,7 @@ static unsigned bch_bio_max_sectors(struct bio *bio)
        ret = min(ret, queue_max_sectors(q));

        WARN_ON(!ret);
-       ret = max_t(int, ret, bio_iovec(bio)->bv_len >> 9);
+       ret = min_t(int, ret, bio_iovec(bio)->bv_len >> 9);

        return ret;
 }
-- 
1.7.9.5
>From 20ad8cfb8047df2d09a5a960610f02c555a31a4f Mon Sep 17 00:00:00 2001
From: Jack Wang <[email protected]>
Date: Tue, 16 Apr 2013 14:59:04 +0200
Subject: [PATCH] limit the max sectors in bcache to fix the make request bug
 in raid10
During test bcache with raid1+0, we saw a lot of complain as below:
[ 2766.555172] md/raid0:md400: make_request bug: can't convert block across chunks or bigger than 512k 953328 144

when the using dd or fio with bigger blocksize like 512k, limited the bio_max_sectors resolve this issue.

Reported-by: Michael Balser <[email protected]>
Signed-off-by: Jack Wang <[email protected]>
Tested-by: Dongsu Park <[email protected]>
---
 drivers/md/bcache/io.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c
index 9b63065..c5c36f7 100644
--- a/drivers/md/bcache/io.c
+++ b/drivers/md/bcache/io.c
@@ -181,7 +181,7 @@ static unsigned bch_bio_max_sectors(struct bio *bio)
 	ret = min(ret, queue_max_sectors(q));
 
 	WARN_ON(!ret);
-	ret = max_t(int, ret, bio_iovec(bio)->bv_len >> 9);
+	ret = min_t(int, ret, bio_iovec(bio)->bv_len >> 9);
 
 	return ret;
 }
-- 
1.7.9.5

Reply via email to