summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsclient/nfsmount.h
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2010-10-19 00:20:00 +0000
committerrmacklem <rmacklem@FreeBSD.org>2010-10-19 00:20:00 +0000
commit4cbec41fe48ec04d799dae677c7c44d5a703e182 (patch)
tree58fc2b105e6e1fb43a4b74746fd54253f3f2102d /sys/fs/nfsclient/nfsmount.h
parent4393b7cb7eaacda209dfdb075d90146991a14617 (diff)
downloadFreeBSD-src-4cbec41fe48ec04d799dae677c7c44d5a703e182.zip
FreeBSD-src-4cbec41fe48ec04d799dae677c7c44d5a703e182.tar.gz
Modify the NFS clients and the NLM so that the NLM can be used
by both clients. Since the NLM uses various fields of the nfsmount structure, those fields were extracted and put in a separate nfs_mountcommon structure stored in sys/nfs/nfs_mountcommon.h. This structure also has a function pointer for a function that extracts the required information from the mount point and nfs vnode for that particular client, for information stored differently by the clients. Reviewed by: jhb MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient/nfsmount.h')
-rw-r--r--sys/fs/nfsclient/nfsmount.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/fs/nfsclient/nfsmount.h b/sys/fs/nfsclient/nfsmount.h
index 9fd9331..5bc69f8 100644
--- a/sys/fs/nfsclient/nfsmount.h
+++ b/sys/fs/nfsclient/nfsmount.h
@@ -35,22 +35,19 @@
#ifndef _NFSCLIENT_NFSMOUNT_H_
#define _NFSCLIENT_NFSMOUNT_H_
+#include <nfs/nfs_mountcommon.h>
+
/*
* Mount structure.
* One allocated on every NFS mount.
* Holds NFS specific information for mount.
*/
struct nfsmount {
- struct mtx nm_mtx;
- int nm_flag; /* Flags for soft/hard... */
- int nm_state; /* Internal state flags */
- struct mount *nm_mountp; /* Vfs structure for this filesystem */
+ struct nfsmount_common nm_com; /* Common fields for nlm */
int nm_numgrps; /* Max. size of groupslist */
u_char nm_fh[NFSX_FHMAX]; /* File handle of root dir */
int nm_fhsize; /* Size of root file handle */
struct nfssockreq nm_sockreq; /* Socket Info */
- int nm_timeo; /* Init timer for NFSMNT_DUMBTIMR */
- int nm_retry; /* Max retries */
int nm_timeouts; /* Request timeouts */
int nm_rsize; /* Max size of read rpc */
int nm_wsize; /* Max size of write rpc */
@@ -89,6 +86,14 @@ struct nfsmount {
#define nm_soproto nm_sockreq.nr_soproto
#define nm_client nm_sockreq.nr_client
#define nm_krbname nm_name
+#define nm_mtx nm_com.nmcom_mtx
+#define nm_flag nm_com.nmcom_flag
+#define nm_state nm_com.nmcom_state
+#define nm_mountp nm_com.nmcom_mountp
+#define nm_timeo nm_com.nmcom_timeo
+#define nm_retry nm_com.nmcom_retry
+#define nm_hostname nm_com.nmcom_hostname
+#define nm_getinfo nm_com.nmcom_getinfo
#define NFSMNT_DIRPATH(m) (&((m)->nm_name[(m)->nm_krbnamelen + 1]))
#define NFSMNT_SRVKRBNAME(m) \
OpenPOWER on IntegriCloud