summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-25 16:20:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-25 16:20:34 +0000
commitd970b407fc0f4fba35fc31aab80ea6ea69788a52 (patch)
tree491e11b95bf9ea1a3fb1e6a886a65b8491cf9841 /monitor.c
parentAdding debian version 4.2-5. (diff)
downloadmdadm-d970b407fc0f4fba35fc31aab80ea6ea69788a52.tar.xz
mdadm-d970b407fc0f4fba35fc31aab80ea6ea69788a52.zip
Merging upstream version 4.2+20230223.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index e0d3be6..820a93d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -22,7 +22,6 @@
#include "mdmon.h"
#include <sys/syscall.h>
#include <sys/select.h>
-#include <signal.h>
static char *array_states[] = {
"clear", "inactive", "suspended", "readonly", "read-auto",
@@ -312,6 +311,9 @@ static int check_for_cleared_bb(struct active_array *a, struct mdinfo *mdi)
struct md_bb *bb;
int i;
+ if (!ss->get_bad_blocks)
+ return -1;
+
/*
* Get a list of bad blocks for an array, then read list of
* acknowledged bad blocks from kernel and compare it against metadata