]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Btrfs: handle a bogus chunk tree nicely
authorJosef Bacik <jbacik@fusionio.com>
Tue, 19 Mar 2013 16:13:25 +0000 (12:13 -0400)
committerChris Mason <chris.mason@fusionio.com>
Thu, 21 Mar 2013 23:24:31 +0000 (19:24 -0400)
commit835d974fabfa9bff4d173ad03c054ac2f673263f
tree7dae22a2ff112055682e79528227814ed7023171
parentd763448286377b8a0e3f179372e9e292bef3c337
Btrfs: handle a bogus chunk tree nicely

If you restore a btrfs-image file system and try to mount that file system we'll
panic.  That's because btrfs-image restores and just makes one big chunk to
envelope the whole disk, since they are really only meant to be messed with by
our btrfs-progs.  So fix up btrfs_rmap_block and the callers of it for mount so
that we no longer panic but instead just return an error and fail to mount.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/extent-tree.c
fs/btrfs/volumes.c