Skip to content

SUNRPC: Create sysfs files for changing IP address

[email protected] linux-nfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v25 patches 15 repliesSuperseded
  3. v1 RFC7 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- 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)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5sunrpc: Create a sunrpc directory under /sys/kernel/net/sunrpc/Makefile net/sunrpc/sunrpc_syms.c net/sunrpc/sysfs.c +1 more+40 -10 replies
2/5sunrpc: Create a client/ subdirectory in the sunrpc sysfsnet/sunrpc/sysfs.c+41 -00 replies
3/5sunrpc: Create per-rpc_clnt sysfs kobjectsinclude/linux/sunrpc/clnt.h net/sunrpc/clnt.c net/sunrpc/sysfs.c +1 more+74 -00 replies
4/5sunrpc: Prepare xs_connect() for taking NULL tasksnet/sunrpc/xprtsock.c+1 -10 replies
5/5sunrpc: Create a per-rpc_clnt file for managing the destination IP addressnet/sunrpc/sysfs.c net/sunrpc/sysfs.h+71 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/5] SUNRPC: Create sysfs files for changing IP address

From: Anna Schumaker <[email protected]>

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
Signature · 1 line
2.29.2