Btrfs-progs: record generation for tree blocks in fsck
authorJosef Bacik <jbacik@fb.com>
Thu, 27 Feb 2014 15:18:41 +0000 (10:18 -0500)
committerChris Mason <clm@fb.com>
Fri, 21 Mar 2014 13:23:30 +0000 (06:23 -0700)
commit47c18d17c52b452a9516c1943d9c2b0fa7902b5a
tree0552ac1fcdf59f056d08e905984323e29df424c0
parentd98a5ffe6f33d4039bf2f60dcd1fc121771d7cbc
Btrfs-progs: record generation for tree blocks in fsck

When working with a user who had a broken file system I noticed that we were
reading a bad copy of a block when the other copy was perfectly fine.  This is
because we don't keep track of the parent generation for tree blocks, so we just
read whichever copy we damned well please with no regards for which is best.
This fixes this problem by recording the parent generation of the tree block so
we can be sure to read the most correct copy before we check it, which will give
us a better chance of fixing really broken filesystems.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
cmds-check.c