Thread (3 messages) 3 messages, 2 authors, 2016-08-11

[PATCH] NULL pointer in raid1_make_request passed to bio_trim when adding md as bcache caching dev

STALE3704d

From: Eric Wheeler <hidden>
Date: 2016-08-11 03:45:47
Also in: linux-block, linux-raid
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

On Sun, 10 Apr 2016 20:01:30 +0200, Sebastian Roesner wrote:
Am 01.04.2016 um 20:14 schrieb Eric Wheeler:
quoted
On Mon, 28 Mar 2016, Shaohua Li wrote:
quoted
On Sat, Mar 26, 2016 at 05:46:16PM +0100, Sebastian Roesner wrote:
quoted
Hello Ming, Eric,

Am 26.03.2016 um 16:40 schrieb Ming Lei:
I was able to reproduce it on a non-productive system, but only after
copying the bcache superblocks/partition starts from the original system,
with new created ones it worked fine.
320 bvecs exceeds what bio-clone_set can handle. Could you please try below patch?
Hey Sebastian,

Have you had a chance to test the patch below from Shaohua Li?
I just tried the patch and it did not crash anymore.
 
Hello all,

It doesn't look like this made it into v4.8-rc1 and it is known to fix at 
least Sebastian's issue.

Can this get into v4.8?

--
Eric Wheeler


commit 92761dad7ff6e1bf25de247e0064dd398e797599
Author: Shaohua Li [off-list ref]
Date:   Mon Mar 28 10:54:35 2016 -0700

    block: don't make BLK_DEF_MAX_SECTORS too big
    
    bio_alloc_bioset() allocates bvecs from bvec_slabs which can only allocate
    maximum 256 bvec (eg, 1M for 4k pages). We can't bump BLK_DEF_MAX_SECTORS to
    exceed this value otherwise bio_alloc_bioset will fail.
    
    This fixes commit 30e2bc08b2bb7c069. We probably should make the bvec_slabs
    hold bigger bvecs if bigger bio size is required.
    
    Signed-off-by: Shaohua Li [off-list ref]
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 7e5d7e0..da64325 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1153,7 +1153,11 @@ extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
 enum blk_default_limits {
 	BLK_MAX_SEGMENTS	= 128,
 	BLK_SAFE_MAX_SECTORS	= 255,
-	BLK_DEF_MAX_SECTORS	= 2560,
+	/*
+	 * if you change this, please also change bvec_alloc and BIO_MAX_PAGES.
+	 * Otherwise bio_alloc_bioset will break.
+	 */
+	BLK_DEF_MAX_SECTORS	= BIO_MAX_SECTORS,
 	BLK_MAX_SEGMENT_SIZE	= 65536,
 	BLK_SEG_BOUNDARY_MASK	= 0xFFFFFFFFUL,
 };
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help