Btrfs-progs: fsck: only allow partial opening under repair mode
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Thu, 29 May 2014 09:59:56 +0000 (17:59 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 10 Oct 2014 16:11:32 +0000 (18:11 +0200)
commit8d2abcb6cc50762536fe04c50bf262f1ccf3b9a3
treef8fd847f82c2ef4663783758c0ebceab7555979e
parent31aa2b5fa7fad6b4bc382b9e40d5b44f856a3f53
Btrfs-progs: fsck: only allow partial opening under repair mode

The reason that we allow partial opening is that sometimes,
we may have some corrupted trees.(for example extent tree), for
fsck repair case, the broken tree may be rebuilt later.

So if users only want to do check but not repair anything, this
patch will make fsck return failure as soon as possible and
tell users that some critial roots have been corrupted.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c