btrfs-progs: Introduce function to fix super block total bytes
authorQu Wenruo <wqu@suse.com>
Tue, 17 Oct 2017 07:12:39 +0000 (15:12 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Nov 2017 14:59:00 +0000 (15:59 +0100)
commita450dc4bfe76329b908e2b5aa43d3e6a6aa22732
tree0959f231c8a70ea051c227293f86e0b4b13330fb
parentea9cd9df2be56041e2d62b0e72c77695b03261f7
btrfs-progs: Introduce function to fix super block total bytes

Recent kernel (starting from v4.6) will refuse to mount if super block
total bytes is smaller than all devices' size.

This makes end user unable to do anything to their otherwise quite
healthy fs.

To fix such problem, introduce repair function to fix it on an unmounted
filesystem.

Reported-by: Asif Youssuff <yoasif@gmail.com>
Reported-by: Rich Rauenzahn <rrauenza@gmail.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
volumes.c
volumes.h