[dm-devel] dev kernels(bio change), evms_activate still produces oops

syrius.ml at no-log.org syrius.ml at no-log.org
Thu Feb 10 00:39:50 UTC 2005


Dave Olien <dmo at osdl.org> writes:

You're right, I'm using raid5.
I can reproduce the oops here by creating a raid5 array (using evms in
my case) with kernel 2.6.10 (bio.c rev <= 1.71) then rebooting to
2.6.10-ac10 or 2.6.11-rc3-bk6 (bio.c rev >= 1.72)
(for information, a 2.6.11-rc3.bk5 + bio.c rev=1.71 doesn't produce
the oops)

> Sorry for being so slow.  Here's a patch that I believe will fix this oops.
> Please give this a try and let me know.  The problem is that when I
> coded up the new bio_clone() code, I made the bad assumption that the
> bio passed in would have been allocated from a bio_set.  In the case
> of raid5 and raid6, this isn't the case.  So, when raid5 passes one
> of its bio's into the dm code, and dm tries to bio_clone() it,
> bio_clone() dereferences a NULL pointer.
>
> As a quick fix, this patch changes bio_clone() to just use the global
> bio_set to allocate the new bio.  Problem is, this potentially sets
> up another bio exhaustion case.  I'm thinking there should maybe
> be a bio_clone_bioset() that accepts a bio_set pointer as an argument.
> That way, dm could for example pass in it's own bio_set to allocate
> from.
>
> But for now, here's the quick patch.  Please give it a try and give
> me the results.
>
>
> diff -ur linux-2.6.11-rc3-bk4-udm1/fs/bio.c linux-2.6.11-rc3-bk4-udm1-patch/fs/bio.c
> --- linux-2.6.11-rc3-bk4-udm1/fs/bio.c	2005-02-08 15:36:16.000000000 -0800
> +++ linux-2.6.11-rc3-bk4-udm1-patch/fs/bio.c	2005-02-09 14:56:39.000000000 -0800
> @@ -258,7 +258,7 @@
>   */
>  struct bio *bio_clone(struct bio *bio, int gfp_mask)
>  {
> -	struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, bio->bi_set);
> +	struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set);
>  
>  	if (b)
>  		__bio_clone(b, bio);

Unfortunatly that does not the trick.
It still oops. Here is the call trace from 2.6.11-rc3-bk6 +
dm-2.6.11-rc3-udm2:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vmware-linux1.serial_out.txt
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20050210/7ba19331/attachment.txt>
-------------- next part --------------

Thanks

-- 


More information about the dm-devel mailing list