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

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