diff options
authorJosef Bacik <>2013-06-14 14:25:54 -0400
committerDavid Sterba <>2013-08-09 14:32:31 +0200
commita54a29a0cd3e46ebd8a73c8ebc3cbbb66aec5d0a (patch)
parente4d53a0b192fa9ec6b89ab6d7570a574bfdd6711 (diff)
Btrfs-progs: commit the csum_root if we do --init-csum-tree
This is just an oddity with the commit stuff in btrfs-progs. It will just update the generation of the root you call with, which in btrfsck case would have been the fs_root. But because we didn't actually update the fs_root we wouldn't have cow'ed the fs root and therefore the generation will not match the node which will make the file system unmountable. Fix this by calling with the csum_root which is the one we're messing with. Thanks, Signed-off-by: Josef Bacik <> Signed-off-by: David Sterba <> Signed-off-by: Chris Mason <>
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-check.c b/cmds-check.c
index cc9606cd..5349d4bf 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -5855,7 +5855,7 @@ int cmd_check(int argc, char **argv)
return -EIO;
- ret = btrfs_commit_transaction(trans, root);
+ ret = btrfs_commit_transaction(trans, info->csum_root);
if (ret)
goto out;