[Drbd-dev] DRBD-8 - next crash in bio_split()
Graham, Simon
Simon.Graham at stratus.com
Wed Sep 13 22:41:25 CEST 2006
> 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?
I'll try this and let you know...
More information about the drbd-dev
mailing list