2c5c7c6753
- rebuild extent records - fix block group accounting - reset csums for rescue nodatasum mount - prune corrupt extent allocation tree blocks - device scanning fixes for dm and multipath - initrd support: move btrfs device scan after block device setup - documentation updates - add csize for file commpressed size - updated restore utility OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=118
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 5ec6eeaff067c706e5bb9fc3144e9bab4e50da1e Mon Sep 17 00:00:00 2001
|
|
From: Josef Bacik <josef@redhat.com>
|
|
Date: Wed, 4 Jan 2012 10:48:32 -0500
|
|
Subject: [PATCH 40/43] Btrfs-progs: fix error output and dont read from cache
|
|
|
|
If we have to build our fs_info by hand don't read from the cache when looking
|
|
for the fs_root just in case we set something up last time. Also actually print
|
|
the right error, not the root which is ok. Thanks,
|
|
|
|
Signed-off-by: Josef Bacik <josef@redhat.com>
|
|
---
|
|
restore.c | 5 +++--
|
|
1 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/restore.c b/restore.c
|
|
index 0b75902..abc66ca 100644
|
|
--- a/restore.c
|
|
+++ b/restore.c
|
|
@@ -893,9 +893,10 @@ static struct btrfs_root *open_fs(const char *dev, u64 root_location, int super_
|
|
key.type = BTRFS_ROOT_ITEM_KEY;
|
|
key.offset = (u64)-1;
|
|
|
|
- root->fs_info->fs_root = btrfs_read_fs_root(root->fs_info, &key);
|
|
+ root->fs_info->fs_root = btrfs_read_fs_root_no_cache(root->fs_info, &key);
|
|
if (IS_ERR(root->fs_info->fs_root)) {
|
|
- fprintf(stderr, "Couldn't read fs_root: %d\n", PTR_ERR(root));
|
|
+ fprintf(stderr, "Couldn't read fs_root: %d\n",
|
|
+ PTR_ERR(root->fs_info->fs_root));
|
|
close_ctree(root);
|
|
return NULL;
|
|
}
|
|
--
|
|
1.7.6.233.gd79bc
|
|
|