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

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