[PATCH]bcache : limit the bio max sectors to make request bug in raid0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are using your bcache-testing branch.

>From 20ad8cfb8047df2d09a5a960610f02c555a31a4f Mon Sep 17 00:00:00 2001
From: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx>
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 <michael.balser@xxxxxxxxxxxxxxxx>
Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx>
Tested-by: Dongsu Park <dongsu.park@xxxxxxxxxxxxxxxx>
---
 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 <jinpu.wang@xxxxxxxxxxxxxxxx>
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 <michael.balser@xxxxxxxxxxxxxxxx>
Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx>
Tested-by: Dongsu Park <dongsu.park@xxxxxxxxxxxxxxxx>
---
 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux