On Tue, May 17, 2016 at 10:30:47AM -0700, Liu Bo wrote: > > If merge_bio gets rid of the BUG_ON, the calles must explicitly handle > > 'ret < 0' unless it's provably not a problem. > > If merge_bio() returns < 0, then it must be __btrfs_map_block() returns < 0, > so even if we continue with submiting this bio, it'd fail at > __btrfs_map_block() again because merge_bio and submit_bio are using the > same bio. Because of that we don't bother to submit it, instead we can > just return in case of (ret < 0), this applies to both > submit_extent_page() and btrfs_submit_compressed_read/write(). > > What do you think?
Makes sense to me. All the partial processing (allocations and bios) need to be cleaned up, which does not seem trivial from the first look. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html