Blame SOURCES/xfsprogs-4.8.0-xfs_repair-exit-with-status-2-if-log-dirtiness-is-un.patch

e59f31
From b04647edea32dbbce0fc12ea6f54a8da706a2265 Mon Sep 17 00:00:00 2001
e59f31
From: Eric Sandeen <sandeen@redhat.com>
e59f31
Date: Mon, 19 Sep 2016 16:01:14 +1000
e59f31
Subject: [PATCH] xfs_repair: exit with status 2 if log dirtiness is unknown
e59f31
e59f31
This new case is mostly like the known dirty log case; the log
e59f31
is corrupt, dirtiness cannot be determined, and a mount/umount
e59f31
cycle or an xfs_repair -L is required.
e59f31
e59f31
So exit with status 2 here as well.
e59f31
e59f31
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
e59f31
Reviewed-by: Zorro Lang <zlang@redhat.com>
e59f31
Signed-off-by: Dave Chinner <david@fromorbit.com>
e59f31
---
e59f31
 repair/phase2.c | 3 ++-
e59f31
 1 file changed, 2 insertions(+), 1 deletion(-)
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
@@ -79,10 +79,11 @@ zero_log(
e59f31
 		_("zero_log: cannot find log head/tail (xlog_find_tail=%d)\n"),
e59f31
 			error);
e59f31
 		if (!no_modify && !zap_log)
e59f31
-			do_error(_(
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
 	} else {
e59f31
 		if (verbose) {
e59f31
 			do_log(