btrfs-progs: skip chunk recover works when check chunks successfully

If no chunks need to be recovered, skip the recover works,
meanwhile the user won't be annoyed by the "ask_user".

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Gui Hecheng 2013-11-28 13:32:50 +08:00 committed by Chris Mason
parent 52ddfa74fe
commit 7af8e4ee2a

View File

@ -1685,6 +1685,9 @@ int btrfs_recover_chunk_tree(char *path, int verbose, int yes)
* droppped from the fs. Don't deal with them now, we will
* check it after the fs is opened.
*/
} else {
fprintf(stderr, "Check chunks successfully with no orphans\n");
goto fail_rc;
}
root = open_ctree_with_broken_chunk(&rc);