Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp611861pxb; Wed, 13 Jan 2021 11:25:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlgQHOzJTJenU36ufapdV+ID+3EZRa+zWp0RqzPTddw9tuPXaiVerZ750gKQef7JgdYwav X-Received: by 2002:a05:6402:352:: with SMTP id r18mr2965657edw.373.1610565951568; Wed, 13 Jan 2021 11:25:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610565951; cv=none; d=google.com; s=arc-20160816; b=1A1D5rZXYruilFP/1NCwlqC+VvRBWjupavzJ4FkqIIQ1+loyXwqS1jE7nxbqj7hBOG z3fN6bfAAwTqRF0NLvo/dxbw7h9dDgf9DBK/c6DQoLn2VdfiFblG8vUasJXMnY+JkDYP ZwgubjWlQwx0OeqPB8IrKcCZgKVNkElcbSIQ54SMJojiTkSfEI5OKtrXgSgBeEfamOrb TPe1fwZEUO2qXvm7bt5xZdSbJBE1kHNG4zZJjrST3dSABYfItm4flau2oF18XZBmgpq1 vfzh2ROQ3y+zNc4hD9xbQTAHXeC5RUsSPvZUuasAXzFc+GYT4c8XbiJrlC92nWozwOgl 7/Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7KBbqWDRQ7UUBREJsNq4gXTjJjNr0zFU1m9UhbdNm6o=; b=tOKgz5EIO6jDmDFfTypa4Pcc49GzXaiQ18Goif18ANePQHMnGn5fo9NRlL9FYUdPuP 5PSCuKlgwhxO/R8qPROnDCrDx2fvF7s6IyfPiKSpuEKQKZmkuOpRb6OffYVxy1kEgb9L N6K0EpDbHQAhvbnWGF+NyHyGppaL6b2y7V17WO6ORHfXFvOrg7YHwLMDPOE7Xo/bmobg uS6CHW27BpHNgpCgZrXGL4Pbq/VMXBE8AwFAalKCsghqPP1qbohQlm98qvYzXx5rkHpt PYCfPpfzUB087Cn5JPnxUx+72NN2YxIrsogVpX5gDETewcNxfodpZgr8jGgpyEJ7kUO7 /ZrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sfcJxQTR; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si1501555ejc.31.2021.01.13.11.25.12; Wed, 13 Jan 2021 11:25:51 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=sfcJxQTR; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726590AbhAMTYO (ORCPT + 99 others); Wed, 13 Jan 2021 14:24:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbhAMTYO (ORCPT ); Wed, 13 Jan 2021 14:24:14 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07B2FC061575 for ; Wed, 13 Jan 2021 11:23:34 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id g1so2519463edu.4 for ; Wed, 13 Jan 2021 11:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7KBbqWDRQ7UUBREJsNq4gXTjJjNr0zFU1m9UhbdNm6o=; b=sfcJxQTRP2sPpzT+r4cAdtk1MRNK9f4wK5dtK0/qbwyfgsr4KuU555m3xN0AJT/UOx blqYI9NAYCrx3QZOD+knDkWpHKzJ0REU43LAfh5g+dkmSsDJn+irt4mEttfKbi03IzwB OJJlndJI6677h1Y2esbz2JyYBwzcsNArw+ivAhvFWgzpQR/tp+h5A7noJkfS4fqDUniH s4ysPXPY7Q+qTJ5vx552DYAn6xGc97gRcx1PrMgGtMa/aWcDWLHPHtPKvyYZQ6m7qy7U ojidxBU/IVAR2+PlTQAeChntej+bTk0aSZUCQTYOnOc0xBQ9OvqASNCkOqfKK+itXfjW wwLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7KBbqWDRQ7UUBREJsNq4gXTjJjNr0zFU1m9UhbdNm6o=; b=d9g9wMXxbDDgrriUJxr0H9WeqYFMbFA6rt4WWaSx5XGdarceWMhIBimHdV4Kgsh+m6 36sFaD6QtQWk6iUAaCT+ckuWhogT26TG0x955PTvkb5h6+NGxmC+TAQYM52E3ppleNXs QZzp/aKsi5bg0R9na8sWzSe72Rsei8u5X6035GA2gImwtNQvgc+BQh1dQoikl7HYTwb+ W2S1YtthIZDypKb9308S1mX9iQq7ai2x8Ab3rRARhBpE47ZhlrSTmHZk1mgxlCTSZKKO 2jZ6fP22Y6Y6242+42PXJhKF4AYsHH9cFoSrJznHEZxjxrhbWLo3V+0b5IfF9yVLgTAe ccAA== X-Gm-Message-State: AOAM532vbYM8RM5kF+OhldGseG6vWmAUIICk7aINDpGkzvruVAe1HShb CHrLh+ZDmKgL62skmoznx1YmGVuN/1Ji0VZsTX0xN5uOvc4= X-Received: by 2002:a50:c315:: with SMTP id a21mr3061981edb.50.1610565812675; Wed, 13 Jan 2021 11:23:32 -0800 (PST) MIME-Version: 1.0 References: <20210111214143.553479-1-Anna.Schumaker@Netapp.com> <20210112165911.GH9248@fieldses.org> In-Reply-To: <20210112165911.GH9248@fieldses.org> From: Anna Schumaker Date: Wed, 13 Jan 2021 14:23:16 -0500 Message-ID: Subject: Re: [RFC PATCH 0/7] SUNRPC: Create sysfs files for changing IP To: "J. Bruce Fields" Cc: Chuck Lever , Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Jan 12, 2021 at 11:59 AM J. Bruce Fields wrote: > > On Tue, Jan 12, 2021 at 08:09:09AM -0500, Chuck Lever wrote: > > Hi Anna- > > > > > On Jan 11, 2021, at 4:41 PM, schumaker.anna@gmail.com wrote: > > > > > > 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. > > > > > > This is a first draft of the code, so any thoughts or suggestions would > > > be greatly appreciated! > > > > One implementation question, one future question. > > > > Would /sys/kernel/net be a little better? or /sys/kernel/sunrpc ? Possibly! I was trying to match /sys/fs/nfs, but I can definitely change this if another location is better. > > > > Do you have a plan to integrate support for fs_locations to probe > > servers for alternate IP addresses? Would that be a userspace > > utility that would plug values into this new /sys API? Yeah, I would expect there to be a new utility to help with assigning new values. I haven't given any thought to using fs_locations yet, but it could probably work. > > We already have dns resolution for fs_locations, right? Why can't we > use that here? Is it that the mount call doesn't give us a host name? > Or we don't trust dns to have the updated IP address for some reason? The mount call doesn't give us a host name (that I can find, at least). By the time we get to the sunrpc layer we're dealing with just the IP address anyway. I'd expect there to be a userland utility to translate the dns name to the new IP address and pass it along to the new API. Anna > > --b. > > > > > > > > Anna > > > > > > > > > Anna Schumaker (7): > > > net: Add a /sys/net directory to sysfs > > > sunrpc: Create a sunrpc directory under /sys/net/ > > > sunrpc: Create a net/ subdirectory in the sunrpc sysfs > > > sunrpc: Create per-rpc_clnt sysfs kobjects > > > sunrpc: Create a per-rpc_clnt file for managing the IP address > > > sunrpc: Prepare xs_connect() for taking NULL tasks > > > sunrpc: Connect to a new IP address provided by the user > > > > > > include/linux/sunrpc/clnt.h | 1 + > > > include/net/sock.h | 4 + > > > net/socket.c | 8 ++ > > > net/sunrpc/Makefile | 2 +- > > > net/sunrpc/clnt.c | 5 ++ > > > net/sunrpc/sunrpc_syms.c | 8 ++ > > > net/sunrpc/sysfs.c | 160 ++++++++++++++++++++++++++++++++++++ > > > net/sunrpc/sysfs.h | 22 +++++ > > > net/sunrpc/xprtsock.c | 3 +- > > > 9 files changed, 211 insertions(+), 2 deletions(-) > > > create mode 100644 net/sunrpc/sysfs.c > > > create mode 100644 net/sunrpc/sysfs.h > > > > > > -- > > > 2.29.2 > > > > > > > -- > > Chuck Lever > > > >