Blame SOURCES/xfsprogs-4.16-xfs_repair-handle-corrupt-log.patch

9bf599
This patch is not yet upstream; there are missing braces under
9bf599
the if (!no_modify && !zap_log) case so that a repair which fails
9bf599
xlog_find_tail() will not be repairable, because -L will not be
9bf599
able to zero out the log.
9bf599
9bf599
Reported-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
9bf599
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
9bf599
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
9bf599
9bf599
Index: xfsprogs-4.5.0/repair/phase2.c
9bf599
===================================================================
9bf599
--- xfsprogs-4.5.0.orig/repair/phase2.c
9bf599
+++ xfsprogs-4.5.0/repair/phase2.c
9bf599
@@ -78,12 +78,13 @@ zero_log(
9bf599
 		do_warn(
9bf599
 		_("zero_log: cannot find log head/tail (xlog_find_tail=%d)\n"),
9bf599
 			error);
9bf599
-		if (!no_modify && !zap_log)
9bf599
+		if (!no_modify && !zap_log) {
9bf599
 			do_warn(_(
9bf599
 "ERROR: The log head and/or tail cannot be discovered. Attempt to mount the\n"
9bf599
 "filesystem to replay the log or use the -L option to destroy the log and\n"
9bf599
 "attempt a repair.\n"));
9bf599
 			exit(2);
9bf599
+		}
9bf599
 	} else {
9bf599
 		if (verbose) {
9bf599
 			do_log(