deleg: make use of delegation stateids

combined nfs41_lock_stateid_arg() into nfs41_open_stateid_arg().  if a delegation is present, use the delegation stateid before looking at lock/open stateids.  if a delegation recall is in progress, wait on its condition variable before falling back to the open stateid

made nfs41_lock_stateid_arg() static to lock.c because of its special semantics; open_to_lock_owner4 for LOCK won't accept a delegation stateid, so nfs41_delegation_to_open() is called to convert it

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-07-07 13:48:48 -04:00 committed by unknown
parent 02216cbf28
commit ee71a62af2
7 changed files with 75 additions and 26 deletions

View file

@ -148,7 +148,7 @@ static int handle_read(nfs41_upcall *upcall)
ULONG pnfs_bytes_read = 0;
int status = NO_ERROR;
nfs41_lock_stateid_arg(upcall->state_ref, &stateid);
nfs41_open_stateid_arg(upcall->state_ref, &stateid);
#ifdef PNFS_ENABLE_READ
status = read_from_pnfs(upcall->root_ref, upcall->state_ref, &stateid,
@ -269,7 +269,7 @@ static int handle_write(nfs41_upcall *upcall)
ULONG pnfs_bytes_written = 0;
int status;
nfs41_lock_stateid_arg(upcall->state_ref, &stateid);
nfs41_open_stateid_arg(upcall->state_ref, &stateid);
#ifdef PNFS_ENABLE_WRITE
status = write_to_pnfs(upcall->root_ref, upcall->state_ref, &stateid,