Skip to contentSkip to conversation

xfs_scrub: lack of kernel support is not a service failure

PATCH In review Darrick J. Wong 2 participants 2 messages Oct 15, 2018 – Oct 16, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs_scrub: lack of kernel support is not a service failure

From: Darrick J. Wong <[email protected]>

Don't treat a lack of kernel support for scrubbing as an automated service failure because we have not actually determined that there's anything wrong with the filesystem.

---
 scrub/xfs_scrub.c |    6 ++++++
 1 file changed, 6 insertions(+)
scrub/xfs_scrub.c +6 -0
index 33b83a5f..6a0304d2 100644
@@ -779,9 +779,15 @@ main(
 	 * for capturing all the log messages if the scrub fails, because the
 	 * fail service uses the service name to gather log messages for the
 	 * error report.
+	 *
+	 * Note: We don't count a lack of kernel support as a service failure
+	 * because we haven't determined that there's anything wrong with the
+	 * filesystem.
 	 */
 	if (is_service) {
 		sleep(2);
+		if (!ctx.scrub_setup_succeeded)
+			return 0;
 		if (ret != SCRUB_RET_SUCCESS)
 			return 1;
 	}
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Don't treat a lack of kernel support for scrubbing as an automated service failure because we have not actually determined that there's anything wrong with the filesystem.

makes sense to me

Quoted 25 lines
---
 scrub/xfs_scrub.c |    6 ++++++
 1 file changed, 6 insertions(+)
scrub/xfs_scrub.c +6 -0
index 33b83a5f..6a0304d2 100644
@@ -779,9 +779,15 @@ main(
 	 * for capturing all the log messages if the scrub fails, because the
 	 * fail service uses the service name to gather log messages for the
 	 * error report.
+	 *
+	 * Note: We don't count a lack of kernel support as a service failure
+	 * because we haven't determined that there's anything wrong with the
+	 * filesystem.
 	 */
 	if (is_service) {
 		sleep(2);
+		if (!ctx.scrub_setup_succeeded)
+			return 0;
 		if (ret != SCRUB_RET_SUCCESS)
 			return 1;
 	}