--- a/usr/src/uts/common/fs/nfs/nfs3_xdr.c Thu Mar 16 16:31:10 2006 -0800
+++ b/usr/src/uts/common/fs/nfs/nfs3_xdr.c Thu Mar 16 20:37:07 2006 -0800
@@ -458,7 +458,10 @@
{
switch (xdrs->x_op) {
case XDR_ENCODE:
- return (xdr_encode_nfs_fh3(xdrs, objp));
+ if (objp->fh3_flags & FH_WEBNFS)
+ return (xdr_nfs_fh3(xdrs, objp));
+ else
+ return (xdr_encode_nfs_fh3(xdrs, objp));
case XDR_DECODE:
return (xdr_decode_nfs_fh3(xdrs, objp));
case XDR_FREE:
--- a/usr/src/uts/common/fs/nfs/nfs_export.c Thu Mar 16 16:31:10 2006 -0800
+++ b/usr/src/uts/common/fs/nfs/nfs_export.c Thu Mar 16 20:37:07 2006 -0800
@@ -1880,6 +1880,7 @@
fh->fh3_length = sizeof (fsid_t)
+ sizeof (ushort_t) + fh->fh3_len
+ sizeof (ushort_t) + fh->fh3_xlen;
+ fh->fh3_flags = 0;
return (0);
}
@@ -1926,6 +1927,7 @@
* Place the length in fh3_length representing the number
* of security flavors (in bytes) in this overloaded fh.
*/
+ fh->fh3_flags = FH_WEBNFS;
fh->fh3_length = (cnt+1) * sizeof (int32_t);
c = (char *)&fh->fh3_u.nfs_fh3_i.fh3_i;
--- a/usr/src/uts/common/nfs/nfs.h Thu Mar 16 16:31:10 2006 -0800
+++ b/usr/src/uts/common/nfs/nfs.h Thu Mar 16 20:37:07 2006 -0800
@@ -1027,6 +1027,7 @@
} nfs_fh3_i;
char data[NFS3_FHSIZE];
} fh3_u;
+ uint_t fh3_flags;
} nfs_fh3;
#define fh3_fsid fh3_u.nfs_fh3_i.fh3_i._fh3_fsid
#define fh3_len fh3_u.nfs_fh3_i.fh3_i._fh3_len
@@ -1037,6 +1038,11 @@
#define FH3TOXFIDP(fh) ((fid_t *)&((fh)->fh3_xlen))
/*
+ * nfs_fh3.fh3_flags values
+ */
+#define FH_WEBNFS 0x1 /* fh is WebNFS overloaded - see makefh3_ol() */
+
+/*
* Two elements were added to the
* diropargs3 structure for performance (xdr-inlining).
* They are not included as part of the args
--- a/usr/src/uts/common/nfs/rnode.h Thu Mar 16 16:31:10 2006 -0800
+++ b/usr/src/uts/common/nfs/rnode.h Thu Mar 16 20:37:07 2006 -0800
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -63,7 +62,7 @@
struct acache_hash *hashq;
} acache_t;
-#define NFS_FHANDLE_LEN 64
+#define NFS_FHANDLE_LEN 72
typedef struct nfs_fhandle {
int fh_len;