Re: [PATCH] dm.c - device-mapper I/O path fixes

From: Joe Thornber (
Date: Wed Dec 11 2002 - 09:18:20 EST

On Wed, Dec 11, 2002 at 07:16:53AM -0600, Kevin Corry wrote:
> However, it might be a good idea to consider how bio's keep track of errors.
> When a bio is created, it is marked UPTODATE. Then, if any part of a bio
> takes an error, the UPTODATE flag is turned off. When the whole bio
> completes, if the UPTODATE flag is still on, there were no errors during the
> i/o. Perhaps the "error" field in "struct dm_io" could be modified to use
> this method of error tracking? Then we could change dec_pending() to be
> something like:
> if (error)
> clear_bit(DM_IO_UPTODATE, &io->error);
> with a "set_bit(DM_IO_UPTODATE, &>error);" in __bio_split().

The problem with this is you don't keep track of the specific error to
later pass to bio_endio(io->bio...). I guess it all comes down to
just how expensive that spin lock is; and since locking only occurs
when there's an error I'm happy with things as they are.

- Joe
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:21 EST