On Thu, Jun 28, 2018 at 08:11:00AM +0300, Nikolay Borisov wrote: > > > On 1.06.2018 04:34, Qu Wenruo wrote: > > This is a long existing bug (from 2012) but exposed by a reporter > > recently, that when compressed extent without data csum get written to > > device-replace target device, the written data is in fact uncompressed data > > other than the original compressed data. > > > > And since btrfs still consider the data is compressed and will try to read it > > as compressed, it can cause read error. > > > > The root cause is located, and one RFC patch already sent to fix it, > > titled "[PATCH RFC] btrfs: scrub: Don't use inode pages for device replace". > > (The RFC is only for the extra possible way to fix the bug, the fix > > itself should work without problem) > > > > Reported-by: James Harvey <jamespharvey20@xxxxxxxxx> > > Signed-off-by: Qu Wenruo <wqu@xxxxxxxx> > > Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx> Thanks for the review! I assume the v3 patch also passes your review :) Eryu -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html