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

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