Frank Filz has uploaded this change for review.

View Change

Split state_lock into st_lock and jct_lock

The state_hdl state_lock is used for two different things.

When used for state (locks, shares, delegations) protection, it
is only used exclusively (i.e. write) so could be just a mutex.

When used for junction protection, it is used as a rwlock.

Also, it's handy for the locks to have a different order with
respect to the export lock. By breaking up and reversing the
order for jct_lock we eliminate a place where we drop the export
lock, take and drop the jct_lock and then retake the export lock.

And separating them makes the code a bit easier to read.

Also caught one place where the state_lock was not taken with
STATELOCK_lock.

Change-Id: I1ceb25d34c1ebae183fc142b2298a3468e6a1b02
Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
---
M src/FSAL/FSAL_CEPH/handle.c
M src/FSAL/FSAL_GPFS/file.c
M src/FSAL/FSAL_MEM/mem_handle.c
M src/FSAL/FSAL_RGW/handle.c
M src/FSAL/FSAL_VFS/file.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_lru.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_lru.h
M src/FSAL/fsal_helper.c
M src/FSAL_UP/fsal_up_top.c
M src/Protocols/NFS/nfs4_op_close.c
M src/Protocols/NFS/nfs4_op_getattr.c
M src/Protocols/NFS/nfs4_op_layoutget.c
M src/Protocols/NFS/nfs4_op_layoutreturn.c
M src/Protocols/NFS/nfs4_op_lock.c
M src/Protocols/NFS/nfs4_op_lookup.c
M src/Protocols/NFS/nfs4_op_open.c
M src/Protocols/NFS/nfs4_op_readdir.c
M src/Protocols/NFS/nfs4_op_secinfo.c
M src/Protocols/NFS/nfs4_pseudo.c
M src/SAL/nfs4_state.c
M src/SAL/state_deleg.c
M src/SAL/state_layout.c
M src/SAL/state_lock.c
M src/SAL/state_misc.c
M src/include/fsal_api.h
M src/include/sal_data.h
M src/include/sal_functions.h
M src/support/exports.c
28 files changed, 123 insertions(+), 125 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/19/490519/1

To view, visit change 490519. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I1ceb25d34c1ebae183fc142b2298a3468e6a1b02
Gerrit-Change-Number: 490519
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx@mindspring.com>
Gerrit-MessageType: newchange