Btrfs-progs: let btrfs-image actually work on a balanced fs
authorJosef Bacik <jbacik@fb.com>
Fri, 26 Sep 2014 13:02:49 +0000 (09:02 -0400)
committerDavid Sterba <dsterba@suse.cz>
Wed, 1 Oct 2014 14:34:53 +0000 (16:34 +0200)
commitf28ad306b348324b2b29ba0f7973dbae3a53d4e4
treeafaec6da0c014923bf31b6c80ce26b07cb9b8a97
parentf6e4243fa8eb102f8fb564800a2bc87d5c110aa2
Btrfs-progs: let btrfs-image actually work on a balanced fs

We use the read extent buffer infrastructure to read the super block when we are
creating a btrfs-image.  This works out fine most of the time except when the fs
has been balanced, then it fails to map the super block.  So we could fix
btrfs-image to read in the super in a special way, but thats more code.  So
instead just check in the eb reading code if we are reading the super and then
don't bother mapping the block, just read the actual offset.  This fixed some
poor guy who was trying to btrfs-image his fs that had been balanced.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
disk-io.c