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

Joe Thornber thornber at redhat.com
Fri Jan 16 11:18:03 UTC 2004


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.  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.  This is an annoying overhead to have for every bio, so I
suggest we change the semantics of target->endio and say that it may
only trigger an io retry if there was an error.  Agree ?

- Joe




More information about the dm-devel mailing list