Btrfs-progs: fsck: force to udate tree root for some cases
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Thu, 6 Mar 2014 05:53:59 +0000 (13:53 +0800)
committerChris Mason <clm@fb.com>
Fri, 21 Mar 2014 13:23:38 +0000 (06:23 -0700)
commit706a90b1223594b95898e3e0355b42354b238669
treebb5c1917a26731cc4a770698f38f968b3d88dc84
parent5ec1876c2c7b9495723053e9b4c85adf24821331
Btrfs-progs: fsck: force to udate tree root for some cases

commit roots won't update root item in tree root if it finds
updated root's bytenr is same as before.

However, this is not right for fsck, we need update tree root in
the following case:

1.overwrite previous root node.

2.reinit reloc data tree, this is because we skip pin relo data
 tree before which means we can allocate same block as before.

Fix this by updating tree root ourselves for the above cases.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
cmds-check.c