summaryrefslogtreecommitdiff
path: root/free-space-cache.c
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@gmail.com>2014-05-07 13:09:14 +0100
committerDavid Sterba <dsterba@suse.cz>2014-10-10 10:38:29 +0200
commit6c9caa4dd60b94e95ac3c8e3e1bcec228fc0b435 (patch)
tree89bae395119272b346b50cefb740d8053e76510f /free-space-cache.c
parent8909f110425f0db35d03c3a6b8ad7ee6b529187a (diff)
btrfs-progs: check, fix csum check in the presence of non-inlined refs
When we have non-inlined extent references, we were failing to find the corresponding extent item for an existing csum item in the csum tree. Reproducer: mkfs.btrfs -f /dev/sdd mount /dev/sdd /mnt xfs_io -f -c "falloc 780366 135302" /mnt/foo xfs_io -c "falloc 327680 151552" /mnt/foo xfs_io -c "pwrite -S 0xff -b 131072 0 131072" /mnt/foo sync for i in `seq 1 40`; do btrfs subvolume snapshot /mnt /mnt/snap$i ; done umount /mnt btrfs check /dev/sdd The check command exited with status 1 and the following output: Checking filesystem on /dev/sdd UUID: 2416ab5f-9d71-457e-bb13-a27d4f6b399a checking extents checking free space cache checking fs roots checking csums There are no extents for csum range 12980224-12984320 Csum exists for 12980224-12984320 but there is no extent record found 1388544 bytes used err is 1 total csum bytes: 132 total tree bytes: 704512 total fs tree bytes: 573440 total extent tree bytes: 16384 btree space waste bytes: 564479 file data blocks allocated: 19341312 referenced 14606336 Btrfs v3.14.1-94-g80597e7 After this change it no longer erroneously reports a missing extent for the csum item and exits with a status of 0. Also added missing btrfs_prev_leaf() return value checks, as we were ignoring errors and non-existence of left siblings completely. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'free-space-cache.c')
0 files changed, 0 insertions, 0 deletions