nfs.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2012 Netapp, Inc. All rights reserved.
  3. *
  4. * Function and structures exported by the NFS module
  5. * for use by NFS version-specific modules.
  6. */
  7. #ifndef __LINUX_INTERNAL_NFS_H
  8. #define __LINUX_INTERNAL_NFS_H
  9. #include <linux/fs.h>
  10. #include <linux/sunrpc/sched.h>
  11. #include <linux/nfs_xdr.h>
  12. struct nfs_subversion {
  13. struct module *owner; /* THIS_MODULE pointer */
  14. struct file_system_type *nfs_fs; /* NFS filesystem type */
  15. const struct rpc_version *rpc_vers; /* NFS version information */
  16. const struct nfs_rpc_ops *rpc_ops; /* NFS operations */
  17. const struct super_operations *sops; /* NFS Super operations */
  18. const struct xattr_handler **xattr; /* NFS xattr handlers */
  19. struct list_head list; /* List of NFS versions */
  20. };
  21. int nfs_register_versions(void);
  22. void nfs_unregister_versions(void);
  23. #ifdef CONFIG_NFS_V4
  24. int init_nfs_v4(void);
  25. void exit_nfs_v4(void);
  26. #else /* CONFIG_NFS_V4 */
  27. static inline int __init init_nfs_v4(void)
  28. {
  29. return 0;
  30. }
  31. static inline void exit_nfs_v4(void)
  32. {
  33. }
  34. #endif /* CONFIG_NFS_V4 */
  35. struct nfs_subversion *get_nfs_version(unsigned int);
  36. void put_nfs_version(struct nfs_subversion *);
  37. void register_nfs_version(struct nfs_subversion *);
  38. void unregister_nfs_version(struct nfs_subversion *);
  39. #endif /* __LINUX_INTERNAL_NFS_H */