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

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