forked from pool/mdadm
702c57405a
run "mdadm --monitor" from systemd instead of init.d sciprt (bnc#849523) - remove mdadmd due to above. - udev-rules-try-mdadm-I-on-change-events.patch (bnc#851993) - policy-NULL-path-isn-t-really-acceptable-use-the-dev.patch - DDF-really-ignore-DDF-metadata-on-partitions.patch - Assemble-avoid-infinite-loop-when-auto-assembling-pa.patch - DDF-fix-detection-of-failed-devices-during-assembly.patch - Grow-fix-problems-with-prematurely-aborting-of-resha.patch - IMSM-don-t-crash-when-creating-an-array-with-missing.patch - mdmon-don-t-complain-about-notifying-parent-when-the.patch - systemd-mdmon-set-IMSM_NO_PLATFORM-1.patch - mdmon-.service-remove-over-ride-of-Standard-IO.patch Various upstream bug fixes. OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=101
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
From 5e57245e3feba65385fc100e0f2c3d1214d79915 Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Tue, 21 Jan 2014 09:43:31 +1100
|
|
Subject: [PATCH 11/13] mdmon: don't complain about notifying parent when there
|
|
is no need
|
|
|
|
When run with --foreground mdmon has no need to notify any
|
|
parent, so it shouldn't even try, let alone complain when it fails.
|
|
|
|
Also close an end of a pipe which is no longer used.
|
|
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
---
|
|
mdmon.c | 11 +++++++----
|
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
|
|
--- mdadm-3.3.orig/mdmon.c
|
|
+++ mdadm-3.3/mdmon.c
|
|
@@ -429,6 +429,7 @@ static int mdmon(char *devnm, int must_f
|
|
wait(&status);
|
|
status = WEXITSTATUS(status);
|
|
}
|
|
+ close(pfd[0]);
|
|
return status;
|
|
}
|
|
} else
|
|
@@ -516,10 +517,12 @@ static int mdmon(char *devnm, int must_f
|
|
container->sock = make_control_sock(devnm);
|
|
|
|
status = 0;
|
|
- if (write(pfd[1], &status, sizeof(status)) < 0)
|
|
- pr_err("failed to notify our parent: %d\n",
|
|
- getppid());
|
|
- close(pfd[1]);
|
|
+ if (pfd[1] >= 0) {
|
|
+ if (write(pfd[1], &status, sizeof(status)) < 0)
|
|
+ pr_err("failed to notify our parent: %d\n",
|
|
+ getppid());
|
|
+ close(pfd[1]);
|
|
+ }
|
|
|
|
mlockall(MCL_CURRENT | MCL_FUTURE);
|
|
|