mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
e96f9268ee
Expand the NFS network-namespaced sysfs from /sys/fs/nfs/net down one level into /sys/fs/nfs by moving the "net" kobject onto struct nfs_netns_client and setting it up during network namespace init. This prepares the way for superblock kobjects within /sys/fs/nfs that will only be visible to matching network namespaces. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
27 lines
533 B
C
27 lines
533 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2019 Hammerspace Inc
|
|
*/
|
|
|
|
#ifndef __NFS_SYSFS_H
|
|
#define __NFS_SYSFS_H
|
|
|
|
#define CONTAINER_ID_MAXLEN (64)
|
|
|
|
struct nfs_netns_client {
|
|
struct kobject kobject;
|
|
struct kobject nfs_net_kobj;
|
|
struct net *net;
|
|
const char __rcu *identifier;
|
|
};
|
|
|
|
extern struct kobject *nfs_net_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
|