[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH] 1/9: Save and restore bio fields

On Friday 16 January 2004 08:49, Joe Thornber wrote:
> On Tue, Jan 13, 2004 at 03:52:41PM -0600, Kevin Corry wrote:
> > Save the necessary bio fields in the target_io structure just before
> > calling generic_make_request(), and restore those bio fields just before
> > calling the target's end_io() routine. This ensures that the target
> > module sees the bio exactly as it was following the map() routine.
> I don't think this implementation is quite right, we need to make sure
> that when the bio does finally succeed/fail the bio->end_io function
> sees the _altered_ version of the bio. 

But remember, we're talking about a different bio at this point. The bio that 
gets submitted to DM never actually gets submitted any further. DM clones 
that bio into one or more new bios. When each new bio completes, DM then 
completes the original bio.

It's these new, cloned bios that this patch modifies, not the original one 
that was submitted to DM.

> The only way I can see of
> doing that is by recording the altered values, and resetting them
> after the targets endio function if the target doesn't want another
> shot.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]