[PATCH 1/4] FIX: Ping monitor when mdmon is running only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When raid0 is created (no other monitored raid in container),
mdmon is not running. Ping is not necessary in such case.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 Manage.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Manage.c b/Manage.c
index 5996646..a032c08 100644
--- a/Manage.c
+++ b/Manage.c
@@ -896,7 +896,13 @@ int Manage_subdevs(char *devname, int fd,
 					sysfs_free(sra);
 					return 1;
 				}
-				ping_monitor(devnum2devname(devnum));
+				if (mdmon_running(devnum)) {
+					char *cont = devnum2devname(devnum);
+					if (cont) {
+						ping_monitor(cont);
+						free(cont);
+					}
+				}
 				sysfs_free(sra);
 				close(container_fd);
 			} else {

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux