On Tue, Oct 19, 2010 at 12:20:01AM +0000, Rick Macklem wrote: > Author: rmacklem > Date: Tue Oct 19 00:20:00 2010 > New Revision: 214048 > URL: http://svn.freebsd.org/changeset/base/214048 > > Log: > 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 I believe the following is needed for 64bit platforms.
diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 816d288..0c27b9d 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -101,7 +101,7 @@ static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp, static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, u_char *, u_char *, u_char *, struct vnode **, struct ucred *, struct thread *, int); -static void nfs_getnlminfo(struct vnode *, uint8_t *, int *, +static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *, struct sockaddr_storage *, int *, off_t *); static vfs_mount_t nfs_mount; static vfs_cmount_t nfs_cmount; @@ -1464,7 +1464,7 @@ nfs_sysctl(struct mount *mp, fsctlop_t op, struct sysctl_req *req) * Extract the information needed by the nlm from the nfs vnode. */ static void -nfs_getnlminfo(struct vnode *vp, uint8_t *fhp, int *fhlenp, +nfs_getnlminfo(struct vnode *vp, uint8_t *fhp, size_t *fhlenp, struct sockaddr_storage *sp, int *is_v3p, off_t *sizep) { struct nfsmount *nmp; diff --git a/sys/nfs/nfs_mountcommon.h b/sys/nfs/nfs_mountcommon.h index fa2547e..c004b9c 100644 --- a/sys/nfs/nfs_mountcommon.h +++ b/sys/nfs/nfs_mountcommon.h @@ -34,7 +34,7 @@ * used by the nlm. It includes a function pointer that provides * a mechanism for getting the client specific info for an nfs vnode. */ -typedef void nfs_getinfofromvp_ftype(struct vnode *, uint8_t *, int *, +typedef void nfs_getinfofromvp_ftype(struct vnode *, uint8_t *, size_t *, struct sockaddr_storage *, int *, off_t *); struct nfsmount_common { diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 3175e0f..45459e5 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -115,7 +115,7 @@ static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp, static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, struct vnode **, struct ucred *cred, int); -static void nfs_getnlminfo(struct vnode *, uint8_t *, int *, +static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *, struct sockaddr_storage *, int *, off_t *); static vfs_mount_t nfs_mount; static vfs_cmount_t nfs_cmount; @@ -1498,7 +1498,7 @@ nfs_sysctl(struct mount *mp, fsctlop_t op, struct sysctl_req *req) * Extract the information needed by the nlm from the nfs vnode. */ static void -nfs_getnlminfo(struct vnode *vp, uint8_t *fhp, int *fhlenp, +nfs_getnlminfo(struct vnode *vp, uint8_t *fhp, size_t *fhlenp, struct sockaddr_storage *sp, int *is_v3p, off_t *sizep) { struct nfsmount *nmp;
pgp8gcO3VfWwa.pgp
Description: PGP signature