Skip to content

Commit

Permalink
Btrfs-progs: pass properly formated key to read_fs_root
Browse files Browse the repository at this point in the history
We have a BUG_ON() in read_fs_root that expects key->offset == (u64)-1.  Restore
will just pass in the location it reads out of the inode if it has a subvol
reference and pass that in, which doesn't have offset == (u64)-1, so it causes
restore blow up.  This was reported in bugzilla and this patch fixed the
problem.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
  • Loading branch information
Josef Bacik authored and Chris Mason committed Jun 19, 2013
1 parent 11be10f commit 10f1af0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmds-restore.c
Expand Up @@ -708,6 +708,7 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
goto next;
}

location.offset = (u64)-1;
search_root = btrfs_read_fs_root(root->fs_info,
&location);
if (IS_ERR(search_root)) {
Expand Down

0 comments on commit 10f1af0

Please sign in to comment.