global_info = info;
root = info->fs_root;
+ uuid_unparse(info->super_copy->fsid, uuidbuf);
+
+ printf("Checking filesystem on %s\nUUID: %s\n", argv[optind], uuidbuf);
+
+ /*
+ * Check the bare minimum before starting anything else that could rely
+ * on it, namely the tree roots, any local consistency checks
+ */
+ if (!extent_buffer_uptodate(info->tree_root->node) ||
+ !extent_buffer_uptodate(info->dev_root->node) ||
+ !extent_buffer_uptodate(info->chunk_root->node)) {
+ error("critical roots corrupted, unable to check the filesystem");
+ err |= !!ret;
+ ret = -EIO;
+ goto close_out;
+ }
if (clear_space_cache) {
ret = do_clear_free_space_cache(info, clear_space_cache);
}
}
- uuid_unparse(info->super_copy->fsid, uuidbuf);
if (qgroup_report) {
printf("Print quota groups for %s\nUUID: %s\n", argv[optind],
uuidbuf);
err |= !!ret;
goto close_out;
}
- printf("Checking filesystem on %s\nUUID: %s\n", argv[optind], uuidbuf);
-
- if (!extent_buffer_uptodate(info->tree_root->node) ||
- !extent_buffer_uptodate(info->dev_root->node) ||
- !extent_buffer_uptodate(info->chunk_root->node)) {
- error("critical roots corrupted, unable to check the filesystem");
- err |= !!ret;
- ret = -EIO;
- goto close_out;
- }
if (init_extent_tree || init_csum_tree) {
struct btrfs_trans_handle *trans;