blob: c8374f74dce1142289ed717c5281b4600a2a44e5 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Chuck Leverf0920752012-05-21 22:45:41 -04002/*
3 * NFS-private data for each "struct net". Accessed with net_generic().
4 */
5
Stanislav Kinsbursky1b340d02011-11-25 17:13:04 +03006#ifndef __NFS_NETNS_H__
7#define __NFS_NETNS_H__
8
Stanislav Kinsburskyca57ccc2012-10-02 14:18:54 +04009#include <linux/nfs4.h>
Stanislav Kinsbursky1b340d02011-11-25 17:13:04 +030010#include <net/net_namespace.h>
11#include <net/netns/generic.h>
12
Stanislav Kinsburskycb9c1c42012-03-11 18:20:23 +040013struct bl_dev_msg {
14 int32_t status;
15 uint32_t major, minor;
16};
17
Trond Myklebustbf11fbd2019-01-29 21:40:10 -050018struct nfs_netns_client;
19
Stanislav Kinsbursky1b340d02011-11-25 17:13:04 +030020struct nfs_net {
21 struct cache_detail *nfs_dns_resolve;
Stanislav Kinsbursky9e2e74d2012-01-10 17:04:24 +040022 struct rpc_pipe *bl_device_pipe;
Stanislav Kinsburskycb9c1c42012-03-11 18:20:23 +040023 struct bl_dev_msg bl_mount_reply;
Stanislav Kinsbursky5ffaf852012-03-11 18:20:31 +040024 wait_queue_head_t bl_wq;
Christoph Hellwige0d4ed72014-09-26 16:02:50 +020025 struct mutex bl_mutex;
Stanislav Kinsbursky6b131682012-01-23 17:26:05 +000026 struct list_head nfs_client_list;
Stanislav Kinsburskyc25d32b2012-01-23 17:26:14 +000027 struct list_head nfs_volume_list;
Bryan Schumaker89d77c82012-07-30 16:05:25 -040028#if IS_ENABLED(CONFIG_NFS_V4)
Stanislav Kinsbursky28cd1b32012-01-23 17:26:22 +000029 struct idr cb_ident_idr; /* Protected by nfs_client_lock */
Stanislav Kinsburskybbe0a3a2012-08-20 18:00:36 +040030 unsigned short nfs_callback_tcpport;
Stanislav Kinsbursky29dcc162012-08-20 18:00:41 +040031 unsigned short nfs_callback_tcpport6;
Stanislav Kinsburskyb3d19c52012-08-20 18:00:46 +040032 int cb_users[NFS4_MAX_MINOR_VERSION + 1];
Stanislav Kinsbursky28cd1b32012-01-23 17:26:22 +000033#endif
Trond Myklebustbf11fbd2019-01-29 21:40:10 -050034 struct nfs_netns_client *nfs_client;
Stanislav Kinsburskydc030852012-01-23 17:26:31 +000035 spinlock_t nfs_client_lock;
Deepa Dinamani2f86e092016-10-01 16:46:26 -070036 ktime_t boot_time;
Eric W. Biederman65b38852014-07-31 04:35:20 -070037#ifdef CONFIG_PROC_FS
38 struct proc_dir_entry *proc_nfsfs;
39#endif
Stanislav Kinsbursky1b340d02011-11-25 17:13:04 +030040};
41
Alexey Dobriyanc7d03a02016-11-17 04:58:21 +030042extern unsigned int nfs_net_id;
Stanislav Kinsbursky1b340d02011-11-25 17:13:04 +030043
44#endif