Ok, I think I understand the problem now - the problem is when break_up_discard_bio does not actually call pool->process_prepared _discard directly, but instead defers it to a worker thread. At that point we might have already completed all the chained bios and the original one by the time we run another instance of process_discard_cell_passdown. So I guess we'll have to live with this for now. I really don't like it very much, and the comments could use a massive improvement, but instead of duplicating the code let's just export the helper: Acked-by: Christoph Hellwig <hch@xxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html