Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1846200pxf; Fri, 19 Mar 2021 18:27:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTcuaMpjBRwGA6pXFH49wuZ0oytrpPQ8g28/77WDL1Y0xPFTZ4s1zMr+FhpyA1kvBlNs1c X-Received: by 2002:a50:ec96:: with SMTP id e22mr12993887edr.385.1616203630330; Fri, 19 Mar 2021 18:27:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1616203630; cv=pass; d=google.com; s=arc-20160816; b=W2ZphgWXc6q1D6/xU6ICjpjySsM91Ng+niIXYwd1YFt7XfVcdZjO9+Un0UhyVo/ip4 5C48K41p1DftAslwQuypezA6zEIoO6Qp5/OqLdmRcJ7GRluvOIam9gGRDDN2KZ2bP9bN IpGYfh7ddYkPnhB7eQyukRv/SM8Z4r1wEMDsKbQGNmlXuJnmCxfAY85ZgukUQ8dE6cAz GtKhBsLW+6BKh7IXsD2mWFvibE66EM6J71jQNyDjYGYoe66Lnp9I4Oo5zX3czi/0Q+2N P9eHwOho84hn9YRIEvbVT8m8oduse+/T+PPcvn7EA1FI/INlrOyLTkjfCZzBh5aSOeH4 ue/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:to:from:dkim-signature; bh=zgGFoJ8vwJDNxPCSuig0CB6LnRHN6nisTdKlEiiDpYY=; b=L6/RvuDgcLM6IBOaU51rlljRu51vbpT3MIslp0vOpxh2CDYyO+xQnqNaaY+ILkYfyS AX7+gBGnGUn2rA/29dkGMFT18v5ATauGoQg8Ig72NUU8nUpMgz4t2ozkLpcOlvIGAc/H V5Mp7FeFulmxLqK/npcnWAzw3Rh18qf8uM5AWWjinGVKMe5pRAAVM5ciFEcbDw2FjJNL ASOsCWQFA8RkfHq+i9+67WCidc6VnQPOZN17RPvX3bijp1mz6tp7QXdHQOWWgLcHfuP0 D9A0dIpuBbTMNNNQ3qXYgEIHClhwFuzPCi3St+cYlWVgV4tVDh/v06ek2kzbfopk4t9u 48rQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=V0E3uCxQ; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si5482958edd.35.2021.03.19.18.26.30; Fri, 19 Mar 2021 18:27:10 -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=@microsoft.com header.s=selector2 header.b=V0E3uCxQ; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229600AbhCTBZ4 (ORCPT + 99 others); Fri, 19 Mar 2021 21:25:56 -0400 Received: from mail-eopbgr1320095.outbound.protection.outlook.com ([40.107.132.95]:6077 "EHLO APC01-PU1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229564AbhCTBZf (ORCPT ); Fri, 19 Mar 2021 21:25:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IqrEO/xriF6s/jJLIjD4Fow+a6nEbCKe4NEDP/oYSiV9zerqL+Gs13eWzh1uC9uUUVymTl6cKlfulqwEDEa4GtjRaeuXtUSLw/Qd8UQA3k+NzK1SKBSvXBBDYAsxUV+HgTC96fCibiuSlueou4Ck+Lhqg/IMIwJBkkskZphNTCW4bb8cYj8FXTQDgYmI1wLJRF0A8rjq7lO8V/uH0Ytf/Tch4fw499CsVNEgBVXbsn5rgE8o6ox/3gFl0EJR3CO9mircw7A5ctGu+sJAzwxsttui7XUKrOHHjhShGgHT7d5RkDTIRQTkCFFKu61FAegZ28QwpsMD7K5KBPqFOhe8PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zgGFoJ8vwJDNxPCSuig0CB6LnRHN6nisTdKlEiiDpYY=; b=oL2wjmXU4d0+PNMc3/9XsflH0NOIQQ5M+/pnfXIJKqaGts6fsGwpm852xEqCATTbccK8O9AaYgHpnq+vjhLgyU6c67Ry/at7xupln0WVO+ADSJVrcJjsb3CKFZQUM/is/0yFArGZX4tXx6Fa5qJg9gvOkZZCwANFzD6nl6/GNFhfXEgpcoYsRgcuaRcWrWcdp/IGDKdm48RDU+JKN4Iuc1eZdiIMqe4p8wTrZhNGC5UG9t1Bv0Yjj4Dfe2wpxEtLq5YHrM4pIiIVNXzYa4SwjMb2wN+QKioUKajqkHsLib/xwVxJCtYv9wsBfhjTeEVa+hfecXQB0gVHkwcfY7ZHUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zgGFoJ8vwJDNxPCSuig0CB6LnRHN6nisTdKlEiiDpYY=; b=V0E3uCxQdqsFnCpRS+PDI4LlwHI9eJgelob3IeVgP4oT6117ANv28ov3n/Gi5Xp3mbHfsGwEYoqYdWQcuHUF5KQ6reM0ZzHpGzxx9aXb2wZ1jIREmLO+2oznlT6fn9ZrKUNkolnf7brHDTgMTG8CSNaJlsGZcGnHmeIiLWIve9g= Received: from SG2P153MB0361.APCP153.PROD.OUTLOOK.COM (2603:1096:0:4::11) by SG2P15301MB0031.APCP153.PROD.OUTLOOK.COM (2603:1096:3:10::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.5; Sat, 20 Mar 2021 01:25:26 +0000 Received: from SG2P153MB0361.APCP153.PROD.OUTLOOK.COM ([fe80::cd6e:9dc1:85ac:f488]) by SG2P153MB0361.APCP153.PROD.OUTLOOK.COM ([fe80::cd6e:9dc1:85ac:f488%5]) with mapi id 15.20.3999.001; Sat, 20 Mar 2021 01:25:26 +0000 From: Nagendra Tomar To: "anna.schumaker@netapp.com" , "linux-nfs@vger.kernel.org" Subject: RE: [PATCH v3 0/5] SUNRPC: Create sysfs files for changing IP address Thread-Topic: [PATCH v3 0/5] SUNRPC: Create sysfs files for changing IP address Thread-Index: AdcdJ6TyS5d0b7lmQfaamCRuNxFJBg== Date: Sat, 20 Mar 2021 01:25:25 +0000 Message-ID: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: netapp.com; dkim=none (message not signed) header.d=none;netapp.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [122.172.188.128] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: e190d4ec-a7e6-47b1-4e56-08d8eb3f0a48 x-ms-traffictypediagnostic: SG2P15301MB0031: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RrwXfQyO1paAHy4ifMDuE0TqH40JcrWgM15AsM4lC5Y5Fn1RW3ppRgB6JLEN2AvX78OS6GFLit0YabyP5x+Ak4L/4/u9sLFg+LCNoQ5JQQxrbdMOSjh9g0HAwpMOSihAZ5ef/T8Vyw6MRG92B24J+RpSyHXqgdY1BqjkObEK/LUEqlC231NkynhlNTA3vX7QxjbrTC2gaaWCVxbXSiR78YCZ8QxIeK5x++8UV1yknPwrtNpFheoHZS8w+hPd0yIlTgyzWbdVKftsh1kEVpmhf3qjYTAdaDC0ieTjBIfrOp24WYri/XI36qE6beOoX0OECu046VLFO+hNM0DA5z6jvun2V3GOXb3Xt4sR5Ri2RTCc/vMEQPECnB+QfwOofgEPm0fvLcyaI5pKLSiJoGqfMpWe6m+ETL0adU3fCmDFW0aep/lqXsTNE0NBUrgM1S5M2dnyWsXnYGX5fy+RSoi4//nhcVK1xU05uw3NF4Y+Q2tv3DXlhCuibWxKx/ch6ovVS2N5Mshv2wYDGYvQOpLyV7GviiIF2ZKo9yXc9KO5eQwmyUjMgaAaBBRtSfszerwNxSW7QKmr18rOshb4dCxhpsEs/hLj8pfCrAnO6oRX5QqDI+6ks1MWa4S185iKl58JaQa8cOM7D+gja/rbQ3Gvm6NZo7Pzu+pSk3ZxLS+y638= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2P153MB0361.APCP153.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(4636009)(376002)(136003)(396003)(366004)(39850400004)(346002)(10290500003)(26005)(8990500004)(82960400001)(82950400001)(2906002)(55016002)(86362001)(6506007)(478600001)(83380400001)(38100700001)(71200400001)(9686003)(186003)(66446008)(8936002)(66556008)(66946007)(5660300002)(66476007)(52536014)(33656002)(8676002)(7696005)(316002)(76116006)(64756008)(53546011)(110136005)(55236004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?CX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brVOfte5x7ErF9?= =?us-ascii?Q?RhTPnpwajPew1RuVOhrFLYo0J5U3MX8HVzcroT45qyqRE+8lqcgNyF/a8Ok2?= =?us-ascii?Q?dqJ9+6jQBoF9n3sK/QZb1FdZIXrNfrs5uChukF32vA/hN3Yglq48MPPy3JGj?= =?us-ascii?Q?ByHl2RnmRy2xjnJyqD1iCxbV31QBPq/hk2Q5uyHR72ktzeTeZnjjnAx8P2Fv?= =?us-ascii?Q?IDWT19bgrnTjw+U0Icnhw8f+QUpZuk0voLyFwva76yn4IjDVcxv9E30/YbxT?= =?us-ascii?Q?gqlER44Y5+ZJsCkmwlggWHUJmyCaTG9XH/qFy5Tv7osqqfQwqi3T8pEMcUDt?= =?us-ascii?Q?Yc1FL3CbieLJjYg/eMceSVEYopGYwkGMnPZ+VIsPx9AdoWQOLy4SbDljV4gz?= =?us-ascii?Q?EtNHa3W6taDbqDsNrRglyE0qTi8G0tpI0KYLb6bG98yZ4P/zqFke/zJRzvK6?= =?us-ascii?Q?zSart7hV9KaYuI4QjDKI10GE?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SG2P153MB0361.APCP153.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: e190d4ec-a7e6-47b1-4e56-08d8eb3f0a48 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2021 01:25:25.8105 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LsUsBTkn1gef/+Q1kDm5bgJE9YLLx2H7y3vFIyh7p6Hh+1QcUB7flZB/Vn8KM10W30B+dZyVx/lz7YT64iIwYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2P15301MB0031 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Anna, We have a similar but slightly different requirement. You change allows a user to force a xprt's remote address to anything, allo= wing it to connect to a different address than what it originally had. The original server/xprt address starts as the one that userspace mount pro= gram provides, possibly after resolving the servername used in the mount command= . Our requirement is that that server name remains same but its address chang= es,=20 aka, DNS failover. Such cases (which I believe are more common) can be handled fully automatic= ally, by resolving the server name before every xprt reconnect. CIFS does this. NFS also has fs/nfs/dns_resolve.c which we can use to do the name resolutio= n, though it's currently not being used for this specific use. Did you have a similar requirement in mind, and/or did you consider the abo= ve? Would like to know your thoughts. Thanks, Tomar -----Original Message----- From: Anna Schumaker On Behalf Of schumaker.anna@= gmail.com Sent: 13 March 2021 02:48 To: linux-nfs@vger.kernel.org Cc: Anna.Schumaker@Netapp.com Subject: [PATCH v3 0/5] SUNRPC: Create sysfs files for changing IP address From: Anna Schumaker It's possible for an NFS server to go down but come back up with a different IP address. These patches provide a way for administrators to handle this issue by providing a new IP address for xprt sockets to connect to. Chuck has suggested some ideas for future work that could also use this interface, such as: - srcaddr: To move between network devices on the client - type: "tcp", "rdma", "local" - bound: 0 for autobind, or the result of the most recent rpcbind query - connected: either true or false - last: read-only timestamp of the last operation to use the transport - device: A symlink to the physical network device Changes in v3: - Rename functions and objects to make future expansion easier - Put files under /sys/kernel/sunrpc/client/ instead of /sys/kernel/sunrpc/net/, again for future expansions - Clean up use of WARN_ON_ONCE() in xs_connect() - Fix up locking, reference counting, and RCU usage - Unconditionally create files so userspace tools don't need to guess what is supported (We return an error message now instead) Changes in v2: - Put files under /sys/kernel/sunrpc/ instead of /sys/net/sunrpc/ - Rename file from "address" to "dstaddr" Thoughts? Anna Anna Schumaker (5): sunrpc: Create a sunrpc directory under /sys/kernel/ sunrpc: Create a client/ subdirectory in the sunrpc sysfs sunrpc: Create per-rpc_clnt sysfs kobjects sunrpc: Prepare xs_connect() for taking NULL tasks sunrpc: Create a per-rpc_clnt file for managing the destination IP address include/linux/sunrpc/clnt.h | 1 + net/sunrpc/Makefile | 2 +- net/sunrpc/clnt.c | 5 + net/sunrpc/sunrpc_syms.c | 8 ++ net/sunrpc/sysfs.c | 191 ++++++++++++++++++++++++++++++++++++ net/sunrpc/sysfs.h | 20 ++++ net/sunrpc/xprtsock.c | 2 +- 7 files changed, 227 insertions(+), 2 deletions(-) create mode 100644 net/sunrpc/sysfs.c create mode 100644 net/sunrpc/sysfs.h --=20 2.29.2