Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4189148pxy; Mon, 26 Apr 2021 21:42:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsIG0ZkEh/DHiVtOE3CkwyRMFhfdvzekQZedEBpS7HReBQgfsOjz01o9vbamyvSnV9EOj5 X-Received: by 2002:a63:5466:: with SMTP id e38mr20152684pgm.172.1619498567263; Mon, 26 Apr 2021 21:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619498567; cv=none; d=google.com; s=arc-20160816; b=vLg2GFCBtxm8qsgFb+CCJyrUcwqPuKNI4O54vBTkvLJxYmCg0lWI7g6APXqOikgXOL MuL5cgccGEUL6jJp9yRmI13KXneyvB5DkjW6Tg2PMpIQuKSaiOZuanbYnxlKoT1+re/e t8HFNx0I9DzMEr9jVYUXLeIhhm5TUDt/Ce8tAF/VmDAwO7jZ89pakMqeNacnc+nvbwXT 7xYNkznmTIU8SNmuasFaNNFVheHqGQNrOubZiPXLBmd7IVw7GlS6g9OFuNsU8w1Vgr9M Vy5S6CIjJakTMkvA2BjbxLa3LqW3lFREh8w3rxozABgNjDzq0t4MW8JAQZI4VVYrMLer eEag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6pSdsPpIU9uN/JJy8DdYBeUcwr55VBNLEgwZAZJ0x4k=; b=EmpPt3cyvBsibsgKT78d/OlH6d27ME0a5kte3bw1pSkFc1DBOuqlucwI781+8o2GP0 4Ff1MVnwisD2Z4GHj4/5vC9jHIh4MqtYbq/BwOHeUqhazhKHJAsQ19+hVlIBB36W9KnI dSuFpz+MqRQE7eiwUlq760iR7anhqeWxcXbseoa4bjQHUiHGfjeJ0KxkU42VWe8hCnFL kZl1lvQzOxnMYoetXYRl14+tabN7c59z1G/2BTM2rCJVi8FGqa6etIHpBdg1BImybfV4 lSMEwNBnXH9/aysL7blLIZoRW6NKav1qvoFQs7vf1tDyj/Rw+zQYQ2WUCWgEJ8s3kV2o Jn7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernelim-com.20150623.gappssmtp.com header.s=20150623 header.b=JycIRdHu; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si19505664pgj.61.2021.04.26.21.42.25; Mon, 26 Apr 2021 21:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernelim-com.20150623.gappssmtp.com header.s=20150623 header.b=JycIRdHu; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbhD0EnD (ORCPT + 99 others); Tue, 27 Apr 2021 00:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbhD0EnD (ORCPT ); Tue, 27 Apr 2021 00:43:03 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26EA4C061574 for ; Mon, 26 Apr 2021 21:42:19 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id n84so3814602wma.0 for ; Mon, 26 Apr 2021 21:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernelim-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6pSdsPpIU9uN/JJy8DdYBeUcwr55VBNLEgwZAZJ0x4k=; b=JycIRdHupJCyJisNoJWoTGhUS5KPxEyouCmNnW8XFELv6fIA6gPyWTcwMSzMV9ENfp Ucb9vHJ+IhJGpthas8ZudT226HWga6PyhU2nRj8UDfSKcKsU8O5Re6meBEEwoGvxz25a P9YdOLvcj5xfGxMCTcnIp2DqqA14bB1ThHIdCTsN/kIoDeTirSh+IYDGKjWBoT3qY1uy a1eQN9Dxo5TAJrLosrWOZiQvw0BPRHt652EnNqFBQw6QqAvyJ/WBGQyE5wZ+2HE/zV1o BS+0WnzwWWuDY+37af+57qo90OACUyzMgKAcfPfcxL8IVEEG31fBp7pqufGzk/oe2aZc I3nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6pSdsPpIU9uN/JJy8DdYBeUcwr55VBNLEgwZAZJ0x4k=; b=cjCacIDkfX7RVelrUFYFyTxfUbtqgepWwhRwwVSQ6jAjYNknZA7YnLN//aHfWOpgTQ VqcG1dbWkvm5KkSwkE9VicGOxdP1bvJimAf8CqKVRwV3O7NXWosm1eMxJj3+pXl/tD+j 2cvypI2j1A9LupZGoUlIMSTDskSDSpeNs6lwaqquv0NAWTNWIwzfriklFZATUj8wSLNh 4vJ206JxP+TxNZsemvcyP96UWiD3Fxew6MkiK57N778n0ne4ScDcXwFJb4kdaDrj435x p0zyYQmcJqMoiI3nJvoALU4Z9aAlpU0wRr6F8ZvvAy8N43A22Js1vCKeUW21l36YyyJM FbUQ== X-Gm-Message-State: AOAM530N+sHlC3yl1kIHkDgVTY235lmu5m1Zumzt5pPiA1iE4VIkd/wl KTYCSR6R8iXsi86qI43ZNSoFV5ttHs9BmKET X-Received: by 2002:a7b:c7c8:: with SMTP id z8mr2231476wmk.112.1619498537917; Mon, 26 Apr 2021 21:42:17 -0700 (PDT) Received: from gmail.com ([77.126.186.5]) by smtp.gmail.com with ESMTPSA id 3sm9520569wmv.26.2021.04.26.21.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 21:42:17 -0700 (PDT) Date: Tue, 27 Apr 2021 07:42:14 +0300 From: Dan Aloni To: Olga Kornievskaia Cc: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH v3 09/13] sunrpc: add a symlink from rpc-client directory to the xprt_switch Message-ID: <20210427044214.vlbmbfdh5dpq4vhl@gmail.com> References: <20210426171947.99233-1-olga.kornievskaia@gmail.com> <20210426171947.99233-10-olga.kornievskaia@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210426171947.99233-10-olga.kornievskaia@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Apr 26, 2021 at 01:19:43PM -0400, Olga Kornievskaia wrote: > From: Olga Kornievskaia > > An rpc client uses a transport switch and one ore more transports > associated with that switch. Since transports are shared among > rpc clients, create a symlink into the xprt_switch directory > instead of duplicating entries under each rpc client. > > Signed-off-by: Olga Kornievskaia > >.. > @@ -188,6 +204,11 @@ void rpc_sysfs_client_destroy(struct rpc_clnt *clnt) > struct rpc_sysfs_client *rpc_client = clnt->cl_sysfs; > > if (rpc_client) { > + char name[23]; > + > + snprintf(name, sizeof(name), "switch-%d", > + rpc_client->xprt_switch->xps_id); > + sysfs_remove_link(&rpc_client->kobject, name); Hi Olga, If a client can use a single switch, shouldn't the name of the symlink be just "switch"? This is to be consistent with other symlinks in `sysfs` such as the ones in block layer, for example in my `/sys/block/sda`: bdi -> ../../../../../../../../../../../virtual/bdi/8:0 device -> ../../../5:0:0:0 -- Dan Aloni