xref: /openbmc/linux/fs/nfs/sysfs.h (revision e2942062)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (c) 2019 Hammerspace Inc
4  */
5 
6 #ifndef __NFS_SYSFS_H
7 #define __NFS_SYSFS_H
8 
9 #define CONTAINER_ID_MAXLEN (64)
10 
11 struct nfs_netns_client {
12 	struct kobject kobject;
13 	struct kobject nfs_net_kobj;
14 	struct net *net;
15 	const char __rcu *identifier;
16 };
17 
18 extern struct kobject *nfs_net_kobj;
19 
20 extern int nfs_sysfs_init(void);
21 extern void nfs_sysfs_exit(void);
22 
23 void nfs_netns_sysfs_setup(struct nfs_net *netns, struct net *net);
24 void nfs_netns_sysfs_destroy(struct nfs_net *netns);
25 
26 void nfs_sysfs_link_rpc_client(struct nfs_server *server,
27 			struct rpc_clnt *clnt, const char *sysfs_prefix);
28 void nfs_sysfs_add_server(struct nfs_server *s);
29 void nfs_sysfs_move_server_to_sb(struct super_block *s);
30 void nfs_sysfs_move_sb_to_server(struct nfs_server *s);
31 void nfs_sysfs_remove_server(struct nfs_server *s);
32 
33 #endif
34