No. Locking is pointless. What exactly you try to protect here?
> disagree. A bio may be split into several sub-bio's. When each of
> those split bio's completes, they are going to call this function.
> But if only one of those split bio's has an error, then the error
> might get lost without that "if" statement.
> 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, &ci.io->error);" in __bio_split().
You seem to overestimate my knowledge of this part of the kernel. :(
-- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/