summaryrefslogtreecommitdiffstats
path: root/fs/nfs/sysfs.h
diff options
context:
space:
mode:
authorTrond Myklebust2019-01-30 03:40:10 +0100
committerTrond Myklebust2019-07-06 20:54:49 +0200
commitbf11fbdb20b385157b046ea7781f04d0c62554a3 (patch)
treefc24ca63f5e1529f713cc9243716dfc45075bd36 /fs/nfs/sysfs.h
parentNFS: Cleanup - add nfs_clients_exit to mirror nfs_clients_init (diff)
downloadkernel-qcow2-linux-bf11fbdb20b385157b046ea7781f04d0c62554a3.tar.gz
kernel-qcow2-linux-bf11fbdb20b385157b046ea7781f04d0c62554a3.tar.xz
kernel-qcow2-linux-bf11fbdb20b385157b046ea7781f04d0c62554a3.zip
NFS: Add sysfs support for per-container identifier
In order to identify containers to the NFS client, we add a per-net sysfs attribute that udev can fill with the appropriate identifier. The identifier could be a unique hostname, but in most cases it will probably be a persisted uuid. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/sysfs.h')
-rw-r--r--fs/nfs/sysfs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/sysfs.h b/fs/nfs/sysfs.h
index 666f8db2ba92..f1b27411dcc0 100644
--- a/fs/nfs/sysfs.h
+++ b/fs/nfs/sysfs.h
@@ -6,10 +6,20 @@
#ifndef __NFS_SYSFS_H
#define __NFS_SYSFS_H
+#define CONTAINER_ID_MAXLEN (64)
+
+struct nfs_netns_client {
+ struct kobject kobject;
+ struct net *net;
+ const char *identifier;
+};
extern struct kobject *nfs_client_kobj;
extern int nfs_sysfs_init(void);
extern void nfs_sysfs_exit(void);
+void nfs_netns_sysfs_setup(struct nfs_net *netns, struct net *net);
+void nfs_netns_sysfs_destroy(struct nfs_net *netns);
+
#endif