OSDN Git Service

NFS: add superblock sysfs entries
authorBenjamin Coddington <bcodding@redhat.com>
Thu, 15 Jun 2023 18:07:26 +0000 (14:07 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 19 Jun 2023 19:03:48 +0000 (15:03 -0400)
commit1c7251187dc067a6d460cf33ca67da9c1dd87807
treec86be60e2f105095aee986f2edf029cd5652a2a7
parente96f9268eea626126021641eefeed02f8669f584
NFS: add superblock sysfs entries

Create a sysfs directory for each mount that corresponds to the mount's
nfs_server struct.  As the mount is being constructed, use the name
"server-n", but rename it to the "MAJOR:MINOR" of the mount after assigning
a device_id. The rename approach allows us to populate the mount's directory
with links to the various rpc_client objects during the mount's
construction.  The naming convention (MAJOR:MINOR) can be used to reference
a particular NFS mount's sysfs tree.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/client.c
fs/nfs/nfs4client.c
fs/nfs/super.c
fs/nfs/sysfs.c
fs/nfs/sysfs.h
include/linux/nfs_fs_sb.h