Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Chuck Lever | f092075 | 2012-05-21 22:45:41 -0400 | [diff] [blame] | 2 | /* |
| 3 | * NFS-private data for each "struct net". Accessed with net_generic(). |
| 4 | */ |
| 5 | |
Stanislav Kinsbursky | 1b340d0 | 2011-11-25 17:13:04 +0300 | [diff] [blame] | 6 | #ifndef __NFS_NETNS_H__ |
| 7 | #define __NFS_NETNS_H__ |
| 8 | |
Stanislav Kinsbursky | ca57ccc | 2012-10-02 14:18:54 +0400 | [diff] [blame] | 9 | #include <linux/nfs4.h> |
Stanislav Kinsbursky | 1b340d0 | 2011-11-25 17:13:04 +0300 | [diff] [blame] | 10 | #include <net/net_namespace.h> |
| 11 | #include <net/netns/generic.h> |
| 12 | |
Stanislav Kinsbursky | cb9c1c4 | 2012-03-11 18:20:23 +0400 | [diff] [blame] | 13 | struct bl_dev_msg { |
| 14 | int32_t status; |
| 15 | uint32_t major, minor; |
| 16 | }; |
| 17 | |
Trond Myklebust | bf11fbd | 2019-01-29 21:40:10 -0500 | [diff] [blame] | 18 | struct nfs_netns_client; |
| 19 | |
Stanislav Kinsbursky | 1b340d0 | 2011-11-25 17:13:04 +0300 | [diff] [blame] | 20 | struct nfs_net { |
| 21 | struct cache_detail *nfs_dns_resolve; |
Stanislav Kinsbursky | 9e2e74d | 2012-01-10 17:04:24 +0400 | [diff] [blame] | 22 | struct rpc_pipe *bl_device_pipe; |
Stanislav Kinsbursky | cb9c1c4 | 2012-03-11 18:20:23 +0400 | [diff] [blame] | 23 | struct bl_dev_msg bl_mount_reply; |
Stanislav Kinsbursky | 5ffaf85 | 2012-03-11 18:20:31 +0400 | [diff] [blame] | 24 | wait_queue_head_t bl_wq; |
Christoph Hellwig | e0d4ed7 | 2014-09-26 16:02:50 +0200 | [diff] [blame] | 25 | struct mutex bl_mutex; |
Stanislav Kinsbursky | 6b13168 | 2012-01-23 17:26:05 +0000 | [diff] [blame] | 26 | struct list_head nfs_client_list; |
Stanislav Kinsbursky | c25d32b | 2012-01-23 17:26:14 +0000 | [diff] [blame] | 27 | struct list_head nfs_volume_list; |
Bryan Schumaker | 89d77c8 | 2012-07-30 16:05:25 -0400 | [diff] [blame] | 28 | #if IS_ENABLED(CONFIG_NFS_V4) |
Stanislav Kinsbursky | 28cd1b3 | 2012-01-23 17:26:22 +0000 | [diff] [blame] | 29 | struct idr cb_ident_idr; /* Protected by nfs_client_lock */ |
Stanislav Kinsbursky | bbe0a3a | 2012-08-20 18:00:36 +0400 | [diff] [blame] | 30 | unsigned short nfs_callback_tcpport; |
Stanislav Kinsbursky | 29dcc16 | 2012-08-20 18:00:41 +0400 | [diff] [blame] | 31 | unsigned short nfs_callback_tcpport6; |
Stanislav Kinsbursky | b3d19c5 | 2012-08-20 18:00:46 +0400 | [diff] [blame] | 32 | int cb_users[NFS4_MAX_MINOR_VERSION + 1]; |
Stanislav Kinsbursky | 28cd1b3 | 2012-01-23 17:26:22 +0000 | [diff] [blame] | 33 | #endif |
Trond Myklebust | bf11fbd | 2019-01-29 21:40:10 -0500 | [diff] [blame] | 34 | struct nfs_netns_client *nfs_client; |
Stanislav Kinsbursky | dc03085 | 2012-01-23 17:26:31 +0000 | [diff] [blame] | 35 | spinlock_t nfs_client_lock; |
Deepa Dinamani | 2f86e09 | 2016-10-01 16:46:26 -0700 | [diff] [blame] | 36 | ktime_t boot_time; |
Eric W. Biederman | 65b3885 | 2014-07-31 04:35:20 -0700 | [diff] [blame] | 37 | #ifdef CONFIG_PROC_FS |
| 38 | struct proc_dir_entry *proc_nfsfs; |
| 39 | #endif |
Stanislav Kinsbursky | 1b340d0 | 2011-11-25 17:13:04 +0300 | [diff] [blame] | 40 | }; |
| 41 | |
Alexey Dobriyan | c7d03a0 | 2016-11-17 04:58:21 +0300 | [diff] [blame] | 42 | extern unsigned int nfs_net_id; |
Stanislav Kinsbursky | 1b340d0 | 2011-11-25 17:13:04 +0300 | [diff] [blame] | 43 | |
| 44 | #endif |