[PATCH rdma-core 4/4] ibacm: Use sd_notify to synchronize bootup

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

 



Tell systemd that ibacm is ready once the RDMA_NL_GROUP_LS socket is
opened. This is the point where ibacm is able to respond to kernel and
user queries for paths.

Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>
---
 ibacm/ibacm.service.in | 1 +
 ibacm/src/acm.c        | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/ibacm/ibacm.service.in b/ibacm/ibacm.service.in
index 7f31ba673da979..88fb751c7f0d76 100644
--- a/ibacm/ibacm.service.in
+++ b/ibacm/ibacm.service.in
@@ -5,6 +5,7 @@ After=opensm.service
 Wants=ibacm.socket
 
 [Service]
+Type=notify
 ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/ibacm --systemd
 
 [Install]
diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
index 3f28f04d8777b9..aba0deaa6de37f 100644
--- a/ibacm/src/acm.c
+++ b/ibacm/src/acm.c
@@ -1721,6 +1721,9 @@ static void acm_server(bool systemd)
 	if (ret)
 		acm_log(1, "Warn - Netlink init failed\n");
 
+	if (systemd)
+		sd_notify(0, "READY=1");
+
 	while (1) {
 		n = (int) listen_socket;
 		FD_ZERO(&readfds);
-- 
2.7.4

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux