* [PATCH] Btrfs-progs: commit the csum_root if we do --init-csum-tree
@ 2013-06-14 18:25 Josef Bacik
0 siblings, 0 replies; only message in thread
From: Josef Bacik @ 2013-06-14 18:25 UTC (permalink / raw)
To: linux-btrfs
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 <jbacik@fusionio.com>
---
cmds-check.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmds-check.c b/cmds-check.c
index 68cdd52..fa77046 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -5227,7 +5227,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)
exit(1);
goto out;
--
1.7.7.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-14 18:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 18:25 [PATCH] Btrfs-progs: commit the csum_root if we do --init-csum-tree Josef Bacik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).