Re: [dm-devel] Re: dm: bio split bvec fix

Jens Axboe
2006-03-22T12:56:31Z

On Wed, Mar 22 2006, Alasdair G Kergon wrote:
> On Wed, Mar 22, 2006 at 12:32:35PM +0100, Jens Axboe wrote:
> > Why isn't this just handled in the merge callback? Can a single page bio
> > span > 2 targets?
>
> Yes. (Unit of size if the sector - and things don't have to
> be aligned nicely, just aligned to sector.)
>
> IIRC the merge function assumes the number of bytes that can
> be added is only a function of the offset: but in our case
> it's also a function of time. To make this work it should
> reserve those bytes with device-mapper, and guarantee either to
> supply them to us subsequently (and preferably quickly) or to
> cancel that reservation. Device-mapper for its part would
> guarantee to accept the bio without needing to split it.
> Or dm could have a rejection mechanism that refuses bios
> that are too big (because the max number of bytes we accept
> got reduced between the initial call and the bio actually being
> presented) and they go back and get processed again.

Ok, thanks for the followup explanation, I guess there's no way around
that then.

--
Jens Axboe