diff mbox

[rdma-core,14/21] Revise the umad SYSTEMD_ALIAS fake path

Message ID 1500926429-31822-15-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe July 24, 2017, 8 p.m. UTC
The only other users of SYSTEMD_ALIAS I could find uses the
/sys/subsystem/ prefix, so we should do the same instead of using
a fake /dev/ prefix.

Fixes: 5a6f287a3cdf ("libibumad: Introduce the /dev/infiniband/umad/${ibdev}:${port}.device alias")
Fixes: d35e5c4f7169 ("srp_daemon.service: Add support for hot-plugging")
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 libibumad/libibumad.udev-rules         | 2 +-
 srp_daemon/srp_daemon_port@.service.in | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/libibumad/libibumad.udev-rules b/libibumad/libibumad.udev-rules
index 8b1ab6b5142009..b9f565eceaf3a3 100644
--- a/libibumad/libibumad.udev-rules
+++ b/libibumad/libibumad.udev-rules
@@ -1 +1 @@ 
-ACTION=="add", SUBSYSTEM=="infiniband_mad", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/infiniband/umad/$attr{ibdev}:$attr{port}"
+ACTION=="add", SUBSYSTEM=="infiniband_mad", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/rdma/devices/$attr{ibdev}:$attr{port}/umad"
diff --git a/srp_daemon/srp_daemon_port@.service.in b/srp_daemon/srp_daemon_port@.service.in
index 0ec966f912aec8..03b9cb9a70119a 100644
--- a/srp_daemon/srp_daemon_port@.service.in
+++ b/srp_daemon/srp_daemon_port@.service.in
@@ -3,8 +3,8 @@  Description=SRP daemon that monitors port %i
 Documentation=man:srp_daemon file:/etc/rdma/rdma.conf file:/etc/srp_daemon.conf
 DefaultDependencies=false
 Conflicts=emergency.target emergency.service
-After=srp_daemon.service dev-infiniband-umad-%i.device network.target
-BindsTo=srp_daemon.service dev-infiniband-umad-%i.device
+After=srp_daemon.service sys-subsystem-rdma-devices-%i-umad.device network.target
+BindsTo=srp_daemon.service sys-subsystem-rdma-devices-%i-umad.device
 Before=remote-fs-pre.target
 
 [Service]