[Drbd-dev] DRBD-8 - next crash in bio_split()
Lars Ellenberg
Lars.Ellenberg at linbit.com
Wed Sep 13 23:51:12 CEST 2006
/ 2006-09-13 16:41:25 -0400
\ Graham, Simon:
> > Index: drbd_req.c
> > ===================================================================
> > --- drbd_req.c (revision 2415)
> > +++ drbd_req.c (working copy)
> > @@ -1068,7 +1068,11 @@
> > unsigned int bio_size = bio->bi_size;
> > int max;
> >
> > +#if 1
> > + max = DRBD_MAX_SEGMENT_SIZE - ((bio_offset &
> > (DRBD_MAX_SEGMENT_SIZE-1)) + bio_size);
> > +#else
> > max = AL_EXTENT_SIZE - ((bio_offset & (AL_EXTENT_SIZE-1)) +
> > bio_size);
> > +#endif
> > if (max < 0) max = 0;
> > if (max <= bvec->bv_len && bio_size == 0)
> > return bvec->bv_len;
>
> I'm not sure to be honest - I take it the intent here is to ensure there
> can only ever be one bio_vec in a bio that needs to be split? And the
> way to do that is to ensure that the only way a request that is too
> large can be passed to DRBD is if it is the first entry that is too
> large?
basically, yes. but the "first_sectors" calculation for the bio_split
was terribly wrong, too.
I just committed the correct fix (I think).
its just been my own "stupidity" (again).
please verify. at least for me, it just copied the complete linux-2.6.17
source tree several times without even triggering an assert.
before that fix, it would just blow up in the very first seconds...
cheers, and good night
--
: Lars Ellenberg Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com :
More information about the drbd-dev
mailing list