/*
* 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.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/pathname.h>
#include <sys/sysmacros.h>
#include <sys/pathconf.h>
#include <nfs/nfs_clnt.h>
#include <vm/seg_kmem.h>
/*
* The order and contents of this structure must be kept in sync with that of
* aclreqcnt_v2_tmpl in nfs_stats.c
*/
char *aclnames_v2[] = {
"null", "getacl", "setacl", "getattr", "access", "getxattrdir"
};
/*
* This table maps from NFS protocol number into call type.
* Zero means a "Lookup" type call
* One means a "Read" type call
* Two means a "Write" type call
* This is used to select a default time-out.
*/
0, 0, 1, 0, 0, 0
};
/*
* Similar table, but to determine which timer to use
* (only real reads and writes!)
*/
0, 0, 0, 0, 0, 0
};
/*
* This table maps from acl operation into a call type
* for the semisoft mount option.
* Zero means do not repeat operation.
* One means repeat.
*/
0, 0, 1, 0, 0, 0
};
/* ARGSUSED */
int
{
int error;
int doqueue;
hrtime_t t;
if (error)
return (error);
return (0);
}
}
}
doqueue = 1;
t = gethrtime();
if (error)
return (error);
if (!error) {
} else {
}
return (error);
}
/* ARGSUSED */
int
{
int error;
int doqueue;
hrtime_t t;
doqueue = 1;
t = gethrtime();
/*
* On success, adding the arguments to setsecattr into the cache have
* not proven adequate. On error, we cannot depend on cache.
* Simply flush the cache to force the next getsecattr
* to go over the wire.
*/
}
if (error)
return (error);
if (!error) {
} else {
}
return (error);
}
int
{
int error;
int doqueue;
hrtime_t t;
doqueue = 1;
t = gethrtime();
if (error)
return (error);
if (!error) {
} else {
}
return (error);
}
/* ARGSUSED */
int
{
int error;
int doqueue;
hrtime_t t;
acc = 0;
acc |= ACCESS2_READ;
return (EROFS);
acc |= ACCESS2_DELETE;
}
acc |= ACCESS2_LOOKUP;
else
acc |= ACCESS2_EXECUTE;
}
} else {
}
/*
* ncr and ncrfree both initially
* point to the memory area returned
* by crnetadjust();
* ncrfree not NULL when exiting means
* that we need to release it
*/
if (cacc == NFS_ACCESS_ALLOWED) {
return (0);
}
if (cacc == NFS_ACCESS_DENIED) {
/*
* If the cred can be adjusted, try again
* with the new cred.
*/
goto tryagain;
}
return (EACCES);
}
}
doqueue = 1;
t = gethrtime();
if (error) {
return (error);
}
if (!error) {
/*
* we just cached results with cred; if cred is the
* adjusted credentials from crnetadjust, we do not want
* to release them before exiting: hence setting ncrfree
* to NULL
*/
/*
* If the cred can be adjusted, try again
* with the new cred.
*/
goto tryagain;
}
}
} else {
}
return (error);
}
/*
* Look up a hidden attribute directory over the wire; the vnode
* we start with could be a file or directory. We have to be
* tricky in recording the name in the rnode r_path - we use the
* magic name XATTR_RPATH and rely on code in failover_lookup() to
* detect this and use this routine to do the same lookup on
* remapping. DNLC is easier: slashes are legal, so we use
* XATTR_DIR_NAME as UFS does.
*/
int
int rfscall_flags)
{
int error;
int doqueue;
hrtime_t t;
doqueue = 1;
t = gethrtime();
if (!error) {
if (!error) {
if (!(rfscall_flags & RFSCALL_SOFT))
} else {
}
}
return (error);
}
/*
* The order and contents of this structure must be kept in sync with that of
* aclreqcnt_v3_tmpl in nfs_stats.c
*/
char *aclnames_v3[] = {
"null", "getacl", "setacl", "getxattrdir"
};
/*
* This table maps from NFS protocol number into call type.
* Zero means a "Lookup" type call
* One means a "Read" type call
* Two means a "Write" type call
* This is used to select a default time-out.
*/
0, 0, 1, 0
};
/*
* This table maps from acl operation into a call type
* for the semisoft mount option.
* Zero means do not repeat operation.
* One means repeat.
*/
0, 0, 1, 0
};
/*
* Similar table, but to determine which timer to use
* (only real reads and writes!)
*/
0, 0, 0, 0
};
/* ARGSUSED */
int
{
int error;
int doqueue;
hrtime_t t;
if (error)
return (error);
return (0);
}
}
}
doqueue = 1;
t = gethrtime();
if (error)
return (error);
if (!error) {
} else {
}
return (error);
}
/* ARGSUSED */
int
{
int error;
int doqueue;
hrtime_t t;
doqueue = 1;
t = gethrtime();
/*
* On success, adding the arguments to setsecattr into the cache have
* not proven adequate. On error, we cannot depend on cache.
* Simply flush the cache to force the next getsecattr
* to go over the wire.
*/
}
if (error)
return (error);
if (!error) {
} else {
}
return (error);
}
int
int rfscall_flags)
{
int error;
int doqueue;
hrtime_t t;
doqueue = 1;
t = gethrtime();
if (error)
return (error);
if (!error) {
} else {
if (error) {
return (error);
}
}
}
if (!(rfscall_flags & RFSCALL_SOFT))
} else {
}
return (error);
}
void
{
sizeof (aclent_t));
}
sizeof (aclent_t));
}
}
static int
{
return (0);
}
}
return (1);
}
static void
{
else {
return;
}
}
}
if (vsp->vsa_aclcnt > 0) {
KM_SLEEP);
}
}
}
}
}
}
if (vsp->vsa_dfaclcnt > 0) {
KM_SLEEP);
}
}
}
}
}
}
static void
{
}