nfs4_deleg_ops.c revision 45100b726a2249674d5bc4334098738a27dcaffd
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* 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
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <nfs/nfs4_kprot.h>
extern u_longlong_t nfs4_srv_caller_id;
/*
* This file contains the code for the monitors which are placed on the vnodes
* of files that are granted delegations by the nfsV4 server. These monitors
* will detect local access that conflict with the delegations and recall the
* delegation from the client before letting the offending operation continue.
*/
/* monitor for open on read delegated file */
int
int mode,
{
/*
* Since this monitor is for a read delegated file, we know that
* only an open for write will cause a conflict.
*/
}
}
}
}
/* monitor for open on write delegated file */
int
int mode,
{
/*
* Since this monitor is for a write delegated file, we know that
* any open will cause a conflict.
*/
}
}
}
/*
* this is only a write delegation op and should only be hit
* by the owner of the delegation. if not, then someone is
* doing a read without doing an open first. shouldn't happen.
*/
int
int ioflag,
struct caller_context *ct)
{
/* use caller context to compare caller to delegation owner */
}
}
}
}
/*
* this should only be hit by the owner of the delegation. if not, then
* someone is doing a write without doing an open first. shouldn't happen.
*/
int
int ioflag,
struct caller_context *ct)
{
/* use caller context to compare caller to delegation owner */
}
}
}
}
int
int flags,
{
/*
* use caller context to compare caller to delegation owner
*/
}
}
}
}
int
int write_lock,
{
/*
* if this is a write lock, then use caller context to compare
* caller to delegation owner
*/
if (write_lock &&
}
}
}
}
int
int write_lock,
{
/* use caller context to compare caller to delegation owner */
}
}
}
}
int
int cmd,
int flag,
{
/* use caller context to compare caller to delegation owner */
}
}
}
}
int
int flag,
{
/* changing security attribute triggers recall */
}
}
}
/* ARGSUSED */
int
char *name)
{
switch (vnevent) {
case VE_REMOVE:
case VE_RENAME_DEST:
/*FALLTHROUGH*/
case VE_RENAME_SRC:
}
}
break;
default:
break;
}
}