@@ -10153,6 +10153,15 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
printf("\tsome software or hardware bugs can fatally damage a volume.\n");
printf("\tThe operation will start in %d seconds.\n", delay);
printf("\tUse Ctrl-C to stop it.\n");
+
+#if EXPERIMENTAL
+ if (init_csum_tree) {
+ printf("\n");
+ printf("\t--init-csum-tree is considered dangerous, if your fs is fine,\n");
+ printf("\tplease use \"btrfstune --csum\" instead, which is considered\n");
+ printf("\tmuch safer\n");
+ }
+#endif
while (delay) {
printf("%2d", delay--);
fflush(stdout);
We already had a report about "btrfs check --init-csum-tree" screwing up a seemingly fine btrfs (which can pass "btrfs check --readonly" without error). This is mostly due to the fact that --init-csum-tree just screw up the csum tree root, and rely on extent tree repair code to repair the damage caused by ourselves. This patch would recommend the end users to go "btrfstune --csum" if that option is present. This has some extra benefits: - More protection/tests on interrupred conversion - No unrelated changes to subvolume and extent trees But this requires the original fs to be mostly fine. Signed-off-by: Qu Wenruo <wqu@suse.com> --- check/main.c | 9 +++++++++ 1 file changed, 9 insertions(+)