[PATCH 2/4] btrfs-progs: skip chunk recover works when check chunks successfully

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 chunk-recover.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/chunk-recover.c b/chunk-recover.c
index ae0d318..45d6eae 100644
--- a/chunk-recover.c
+++ b/chunk-recover.c
@@ -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);
-- 
1.8.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux