Btrfs-progs: add the ability to find mismmatching backrefs
authorJosef Bacik <jbacik@fusionio.com>
Thu, 9 May 2013 14:09:55 +0000 (10:09 -0400)
committerroot <Chris Mason chris.mason@fusionio.com>
Fri, 10 May 2013 15:03:15 +0000 (11:03 -0400)
commit650e656a8b9c1fbe4ec5cd8c48ae285b8abd3b69
tree5664915d3972a8c34fef069739cee6a9e9593952
parent850581d48a9039367c308a07f4959682a4e24429
Btrfs-progs: add the ability to find mismmatching backrefs

An unfortunate side effect to my fsync bug means that anybody who didn't hit the
BUG_ON() during tree log replay would have ended up with a corrupted file
system.  Currently our fsck does not catch this because it just looks for
bytenrs for backrefs, it doesn't look at the num_bytes at all.  So this patch
makes us keep track of how big the backrefs are, since their disk_num_bytes
_have_ to match the number of bytes for the actual extent item.  With this patch
fsck now finds problems with a file system it previously thought was ok.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
cmds-check.c