[PATCH] Btrfs: fix csum tree corruption, duplicate and outdated checksums

2014-08-09 Thread Filipe Manana
Under rare circumstances we can end up leaving 2 versions of a checksum for the same file extent range. The reason for this is that after calling btrfs_next_leaf we process slot 0 of the leaf it returns, instead of processing the slot set in path-slots[0]. Most of the time (by far) path-slots[0]

Re: [PATCH] Btrfs: fix csum tree corruption, duplicate and outdated checksums

2014-08-09 Thread Josef Bacik
I'm getting on a plane right now to kiss you, be prepared. Thanks, Josef Filipe Manana fdman...@suse.com wrote: Under rare circumstances we can end up leaving 2 versions of a checksum for the same file extent range. The reason for this is that after calling btrfs_next_leaf we process slot 0

Re: [PATCH] Btrfs: fix csum tree corruption, duplicate and outdated checksums

2014-08-09 Thread Marc MERLIN
On Sat, Aug 09, 2014 at 09:22:27PM +0100, Filipe Manana wrote: (100 lines of detailled explanations snipped) - slot = 0; + slot = path-slots[0]; And this is why, trying to rank kernel contributions by number of lines or characters is a very poor guide

Re: [PATCH] Btrfs: fix csum tree corruption, duplicate and outdated checksums

2014-08-09 Thread Chris Mason
On 08/09/2014 04:22 PM, Filipe Manana wrote: Under rare circumstances we can end up leaving 2 versions of a checksum for the same file extent range. The reason for this is that after calling btrfs_next_leaf we process slot 0 of the leaf it returns, instead of processing the slot set in