Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
btrfsprogs
0141-Btrfs-progs-fix-restore-to-actually-use-th...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0141-Btrfs-progs-fix-restore-to-actually-use-the-root-loc.patch of Package btrfsprogs
From f0346659db85b826c14392f9a627d845ab47b7e2 Mon Sep 17 00:00:00 2001 From: Josef Bacik <josef@redhat.com> Date: Wed, 4 Jan 2012 10:36:41 -0500 Subject: [PATCH 38/43] Btrfs-progs: fix restore to actually use the root location if specified We were using the wrong variable for the root location if we specified -f when doing restore. Fix this. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- restore.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/restore.c b/restore.c index 95daef2..0b75902 100644 --- a/restore.c +++ b/restore.c @@ -871,13 +871,13 @@ static struct btrfs_root *open_fs(const char *dev, u64 root_location, int super_ return NULL; } if (!root_location) - bytenr = btrfs_super_root(&root->fs_info->super_copy); + root_location = btrfs_super_root(&root->fs_info->super_copy); blocksize = btrfs_level_size(root, btrfs_super_root_level(&root->fs_info->super_copy)); generation = btrfs_super_generation(&root->fs_info->super_copy); - root->fs_info->tree_root->node = read_tree_block(root, bytenr, + root->fs_info->tree_root->node = read_tree_block(root, root_location, blocksize, generation); if (!root->fs_info->tree_root->node) { @@ -895,7 +895,7 @@ static struct btrfs_root *open_fs(const char *dev, u64 root_location, int super_ root->fs_info->fs_root = btrfs_read_fs_root(root->fs_info, &key); if (IS_ERR(root->fs_info->fs_root)) { - fprintf(stderr, "Couldn't read fs_root: %ld\n", PTR_ERR(root)); + fprintf(stderr, "Couldn't read fs_root: %d\n", PTR_ERR(root)); close_ctree(root); return NULL; } -- 1.7.6.233.gd79bc
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor