nfs_sys.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This is filled in with an appropriate address for the
* function that will traverse the rfs4_client_t table
* and mark any matching IP Address as "forced_expire".
*
* It is the server init() function that plops the
* function pointer.
*/
/* This filled in by nfssrv:_init() */
void (*nfs_srv_quiesce_func)(void) = NULL;
/*
* These will be reset by klmmod:lm_svc(), when lockd starts NLM service,
* klmmod, the declarations need to be here (in nfs, on which both depend) so
* that nfssrv can see the klmmod changes.
* be adjusted.
*/
int
{
int error = 0;
secpolicy_nfs(CRED()) != 0)
switch (opcode) {
case NFS4_CLR_STATE: { /* Clear NFS4 client state */
struct nfs4clrst_args clr;
/*
* If the server is not loaded then no point in
* clearing nothing :-)
*/
if (rfs4_client_clrst == NULL) {
break;
}
if (!INGLOBALZONE(curproc))
break;
}
case SVCPOOL_CREATE: { /* setup an RPC server thread pool */
struct svcpool_args p;
error = svc_pool_create(&p);
break;
}
case SVCPOOL_WAIT: { /* wait in kernel for threads to be needed */
int id;
break;
}
case SVCPOOL_RUN: { /* give work to a runnable thread */
int id;
break;
}
case RDMA_SVC_INIT: {
struct rdma_svc_args rsa;
if (!INGLOBALZONE(curproc))
if (get_udatamodel() != DATAMODEL_NATIVE) {
} else {
}
break;
}
case NFS_SVC: { /* NFS server daemon */
if (!INGLOBALZONE(curproc))
break;
}
/* Request that NFS server quiesce on next shutdown */
case NFS_SVC_REQUEST_QUIESCE: {
int id;
/* check that nfssrv module is loaded */
if (nfs_srv_quiesce_func == NULL)
(void *)nfs_srv_quiesce_func);
break;
}
case EXPORTFS: { /* export a file system */
if (!INGLOBALZONE(curproc))
break;
}
case NFS_GETFH: { /* get a file handle */
if (!INGLOBALZONE(curproc))
break;
}
case NFS_REVAUTH: { /* revoke the cached credentials for the uid */
/* This call performs its own privilege checking */
break;
}
case LM_SVC: { /* LM server daemon */
struct lm_svc_args lsa;
if (get_udatamodel() != DATAMODEL_NATIVE) {
} else {
}
break;
}
case KILL_LOCKMGR: {
error = lm_shutdown();
break;
}
case LOG_FLUSH: { /* Flush log buffer and possibly rename */
break;
}
case NFS4_SVC: { /* NFS client callback daemon */
break;
}
case NFS_IDMAP: {
struct nfsidmap_args idm;
error = 0;
break;
}
default:
break;
}
}