netns.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * NFS-private data for each "struct net". Accessed with net_generic().
  4. */
  5. #ifndef __NFS_NETNS_H__
  6. #define __NFS_NETNS_H__
  7. #include <linux/nfs4.h>
  8. #include <net/net_namespace.h>
  9. #include <net/netns/generic.h>
  10. #include <linux/sunrpc/stats.h>
  11. struct bl_dev_msg {
  12. int32_t status;
  13. uint32_t major, minor;
  14. };
  15. struct nfs_netns_client;
  16. struct nfs_net {
  17. struct cache_detail *nfs_dns_resolve;
  18. struct rpc_pipe *bl_device_pipe;
  19. struct bl_dev_msg bl_mount_reply;
  20. wait_queue_head_t bl_wq;
  21. struct mutex bl_mutex;
  22. struct list_head nfs_client_list;
  23. struct list_head nfs_volume_list;
  24. #if IS_ENABLED(CONFIG_NFS_V4)
  25. struct idr cb_ident_idr; /* Protected by nfs_client_lock */
  26. unsigned short nfs_callback_tcpport;
  27. unsigned short nfs_callback_tcpport6;
  28. int cb_users[NFS4_MAX_MINOR_VERSION + 1];
  29. struct list_head nfs4_data_server_cache;
  30. spinlock_t nfs4_data_server_lock;
  31. #endif /* CONFIG_NFS_V4 */
  32. struct nfs_netns_client *nfs_client;
  33. spinlock_t nfs_client_lock;
  34. ktime_t boot_time;
  35. struct rpc_stat rpcstats;
  36. #ifdef CONFIG_PROC_FS
  37. struct proc_dir_entry *proc_nfsfs;
  38. #endif
  39. };
  40. extern unsigned int nfs_net_id;
  41. #endif