diff options
author | thurlow <none@none> | 2006-03-16 20:37:07 -0800 |
---|---|---|
committer | thurlow <none@none> | 2006-03-16 20:37:07 -0800 |
commit | 6a8ebdc398b9746560fa1c6d6d3d03be4cfd32f9 (patch) | |
tree | e309093757211b136cfd1c44337f83e8914b1a5b /usr/src | |
parent | 0373e76b3c3643df49ef3483e0f293fdea61d8c6 (diff) | |
download | illumos-joyent-6a8ebdc398b9746560fa1c6d6d3d03be4cfd32f9.tar.gz |
6399242 WebNFS traffic fails on Sparc, panics on x86
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs3_xdr.c | 5 | ||||
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs_export.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/nfs/nfs.h | 6 | ||||
-rw-r--r-- | usr/src/uts/common/nfs/rnode.h | 9 |
4 files changed, 16 insertions, 6 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs3_xdr.c b/usr/src/uts/common/fs/nfs/nfs3_xdr.c index 61d53cb168..42e4109689 100644 --- a/usr/src/uts/common/fs/nfs/nfs3_xdr.c +++ b/usr/src/uts/common/fs/nfs/nfs3_xdr.c @@ -458,7 +458,10 @@ xdr_nfs_fh3_server(XDR *xdrs, nfs_fh3 *objp) { 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: diff --git a/usr/src/uts/common/fs/nfs/nfs_export.c b/usr/src/uts/common/fs/nfs/nfs_export.c index f645243111..3a24ad5c50 100644 --- a/usr/src/uts/common/fs/nfs/nfs_export.c +++ b/usr/src/uts/common/fs/nfs/nfs_export.c @@ -1880,6 +1880,7 @@ makefh3(nfs_fh3 *fh, vnode_t *vp, struct exportinfo *exi) 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 @@ makefh3_ol(nfs_fh3 *fh, struct exportinfo *exi, uint_t sec_index) * 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; diff --git a/usr/src/uts/common/nfs/nfs.h b/usr/src/uts/common/nfs/nfs.h index 173f7800f8..d6011d4005 100644 --- a/usr/src/uts/common/nfs/nfs.h +++ b/usr/src/uts/common/nfs/nfs.h @@ -1027,6 +1027,7 @@ typedef struct nfs_fh3 { } 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 @@ typedef struct nfs_fh3 { #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 diff --git a/usr/src/uts/common/nfs/rnode.h b/usr/src/uts/common/nfs/rnode.h index 11520dd356..e4eb0cee5c 100644 --- a/usr/src/uts/common/nfs/rnode.h +++ b/usr/src/uts/common/nfs/rnode.h @@ -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 @@ typedef struct acache { struct acache_hash *hashq; } acache_t; -#define NFS_FHANDLE_LEN 64 +#define NFS_FHANDLE_LEN 72 typedef struct nfs_fhandle { int fh_len; |