From patchwork Mon Jul 24 20:00:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 9860229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E488F60349 for ; Mon, 24 Jul 2017 20:03:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7B4C285A2 for ; Mon, 24 Jul 2017 20:03:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC5BB285A7; Mon, 24 Jul 2017 20:03:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E4A2285A3 for ; Mon, 24 Jul 2017 20:03:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751871AbdGXUD0 (ORCPT ); Mon, 24 Jul 2017 16:03:26 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:38433 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783AbdGXUDZ (ORCPT ); Mon, 24 Jul 2017 16:03:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=References:In-Reply-To:Message-Id:Date:Subject:To:From; bh=aUqmgsrCmnfHrPQdSSK+lOKAoWsynlSkh1GyjHJrHd8=; b=OH2ZrCyOBvvpItFlSGpHRGG+SCP8+1bj1fjT8TOQSkWxm6TEK11taLA9X12dR8WJExtgiV38GfePPm8fXLyDbvrmFQdp5W6T4t0HDgIzi1g9CXQmyriMiUvdpJp8hzwdF3ZDs9ILDqs2+zgGRpgy8Ev/DwRc0+UQqG6XVP5sNDU=; Received: from [10.0.0.156] (helo=jggl.edm.orcorp.ca) by quartz.orcorp.ca with esmtps (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dZjWx-0001rL-6D; Mon, 24 Jul 2017 14:00:39 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org, Leon Romanovsky , Doug Ledford , Benjamin Drung , Jarod Wilson Subject: [PATCH rdma-core 14/21] Revise the umad SYSTEMD_ALIAS fake path Date: Mon, 24 Jul 2017 14:00:22 -0600 Message-Id: <1500926429-31822-15-git-send-email-jgunthorpe@obsidianresearch.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500926429-31822-1-git-send-email-jgunthorpe@obsidianresearch.com> References: <1500926429-31822-1-git-send-email-jgunthorpe@obsidianresearch.com> X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.156 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- libibumad/libibumad.udev-rules | 2 +- srp_daemon/srp_daemon_port@.service.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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]