mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
1c606fb74c
This patch exports symbols and moves over the final structures needed by the v3 module. In addition, I also switch over to using IS_ENABLED() to check if CONFIG_NFS_V3 or CONFIG_NFS_V3_MODULE are set. The module (nfs3.ko) will be created in the same directory as nfs.ko and will be automatically loaded the first time you try to mount over NFS v3. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2012 Netapp, Inc. All rights reserved.
|
|
*
|
|
* Function and structures exported by the NFS module
|
|
* for use by NFS version-specific modules.
|
|
*/
|
|
#ifndef __LINUX_INTERNAL_NFS_H
|
|
#define __LINUX_INTERNAL_NFS_H
|
|
|
|
#include <linux/fs.h>
|
|
#include <linux/sunrpc/sched.h>
|
|
#include <linux/nfs_xdr.h>
|
|
|
|
struct nfs_subversion {
|
|
struct module *owner; /* THIS_MODULE pointer */
|
|
struct file_system_type *nfs_fs; /* NFS filesystem type */
|
|
const struct rpc_version *rpc_vers; /* NFS version information */
|
|
const struct nfs_rpc_ops *rpc_ops; /* NFS operations */
|
|
const struct super_operations *sops; /* NFS Super operations */
|
|
const struct xattr_handler **xattr; /* NFS xattr handlers */
|
|
struct list_head list; /* List of NFS versions */
|
|
};
|
|
|
|
int nfs_register_versions(void);
|
|
void nfs_unregister_versions(void);
|
|
|
|
#ifdef CONFIG_NFS_V4
|
|
int init_nfs_v4(void);
|
|
void exit_nfs_v4(void);
|
|
#else /* CONFIG_NFS_V4 */
|
|
static inline int __init init_nfs_v4(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void exit_nfs_v4(void)
|
|
{
|
|
}
|
|
#endif /* CONFIG_NFS_V4 */
|
|
|
|
struct nfs_subversion *get_nfs_version(unsigned int);
|
|
void put_nfs_version(struct nfs_subversion *);
|
|
void register_nfs_version(struct nfs_subversion *);
|
|
void unregister_nfs_version(struct nfs_subversion *);
|
|
|
|
#endif /* __LINUX_INTERNAL_NFS_H */
|