usr/src/uts/common/fs/nfs/nfs4_srv_ns.c
changeset 1610 3436e82414c8
parent 806 849fb015aa25
child 4871 617ab0770307
equal deleted inserted replaced
1609:849e31419354 1610:3436e82414c8
     1 /*
     1 /*
     2  * CDDL HEADER START
     2  * CDDL HEADER START
     3  *
     3  *
     4  * The contents of this file are subject to the terms of the
     4  * The contents of this file are subject to the terms of the
     5  * Common Development and Distribution License, Version 1.0 only
     5  * Common Development and Distribution License (the "License").
     6  * (the "License").  You may not use this file except in compliance
     6  * You may not use this file except in compliance with the License.
     7  * with the License.
       
     8  *
     7  *
     9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
    10  * or http://www.opensolaris.org/os/licensing.
     9  * or http://www.opensolaris.org/os/licensing.
    11  * See the License for the specific language governing permissions
    10  * See the License for the specific language governing permissions
    12  * and limitations under the License.
    11  * and limitations under the License.
    17  * fields enclosed by brackets "[]" replaced with your own identifying
    16  * fields enclosed by brackets "[]" replaced with your own identifying
    18  * information: Portions Copyright [yyyy] [name of copyright owner]
    17  * information: Portions Copyright [yyyy] [name of copyright owner]
    19  *
    18  *
    20  * CDDL HEADER END
    19  * CDDL HEADER END
    21  *
    20  *
    22  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
    21  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
    23  * Use is subject to license terms.
    22  * Use is subject to license terms.
    24  */
    23  */
    25 
    24 
    26 #pragma ident	"%Z%%M%	%I%	%E% SMI"
    25 #pragma ident	"%Z%%M%	%I%	%E% SMI"
    27 
    26 
    56 
    55 
    57 	/*
    56 	/*
    58 	 * XXX nfs4_fid() does nothing and returns EREMOTE.
    57 	 * XXX nfs4_fid() does nothing and returns EREMOTE.
    59 	 * XXX nfs3_fid()/nfs_fid() returns nfs filehandle as its fid
    58 	 * XXX nfs3_fid()/nfs_fid() returns nfs filehandle as its fid
    60 	 * which has a bigger length than local fid.
    59 	 * which has a bigger length than local fid.
    61 	 * NFS_FHMAXDATA_EXT is the size of
    60 	 * NFS_FH4MAXDATA is the size of
    62 	 * fhandle_ext_t.fh_xdata[NFS_FHMAXDATA_EXT].
    61 	 * fhandle4_t.fh_xdata[NFS_FH4MAXDATA].
    63 	 *
    62 	 *
    64 	 * Note: nfs[2,3,4]_fid() only gets called for diskless clients.
    63 	 * Note: nfs[2,3,4]_fid() only gets called for diskless clients.
    65 	 */
    64 	 */
    66 	if (error == EREMOTE ||
    65 	if (error == EREMOTE ||
    67 	    (error == 0 && fidp->fid_len > NFS_FHMAXDATA_EXT)) {
    66 	    (error == 0 && fidp->fid_len > NFS_FH4MAXDATA)) {
    68 
    67 
    69 		va.va_mask = AT_NODEID;
    68 		va.va_mask = AT_NODEID;
    70 		error = VOP_GETATTR(vp, &va, 0, CRED());
    69 		error = VOP_GETATTR(vp, &va, 0, CRED());
    71 		if (error)
    70 		if (error)
    72 			return (error);
    71 			return (error);