1. wbclient interface change.
2. adding support to get group list for RPCSEC_GSS flavor
Rremove the following dead code from Ganesha.

Author: Marc Eshel <eshel@us.ibm.com>
Add multilock tool to Ganesha tree

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Add some sample tests for multilock

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Fixup some FSAL_UP log messages

Use COMPONENT_FSAL_UP in FSAL/FSAL_GPFS/fsal_up.c

Remove some \n

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Check flags in cache_inode_invalidate properly

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Replace cache_inode_file_holds_state with cache_inode_is_pinned

By checking if file is pinned, cache_inode_close doesn't need to
poke into SAL internals. Also avoids checking if state is present
without holding state_lock.

Added CACHE_INODE_FLAG_NOT_PINNED. This informs cache_inode_close
that the file is known to be unpinned, and therefore
cache_inode_close will not call cache_inode_is_pinned. This avoids
a lru mutex deadlock.

Also, add/modify some debug log messages.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Move when we check if file sould be unpinned if all locks are removed by unlock.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Make abstrat_atomic consistent

Unadorned atomic_ operations now return the value after performing the
operation on all supported versions of GCC.

A new family of functions, atomic_post returns the value before
performing the operation (analogous to the post-increment/decrement
operators).

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Make noisy LogInfo a LogDebug in MainNFSD/nfs_worker_thread.c

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Add missing state_share_wipe to wipe NLM shares

Also clean up a bit of NLM conditional compiling.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Clean up grace period reporting

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Convert NSM and NLM Client to new HashTable_GetLatch

Converting NSM Client and NLM Client to use new HashTable_GetLatch
allows atomic creation of those object types. Also, the refcounts
are converted to atomic int32_t so that mutex doesn't need to be
held for refcount operations.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Convert state owners to use new HashTable_GetLatch

Using HashTable_GetLatch allows state owners to be created
without worry of race. The so_refcount is also converted to
an atomic uint32_t to allow refcounting without grabbing
so_mutex.

All state owners are hashed using the state_owner_t structure
as the key as well as the data. The key fields are all available
within the state_owner_t structure so the hash may use them
for key evaluation. This reduces memory use.

There is now a generic get_state_owner which will determine
which hash table to use based on so_type in the key. Callers
may indicate if they care if the owner is found or not, if they
don't care, a new owner is not created if not found.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
With --enable-debug-memleaks, keep list of all state owners and stateids

To help track down memory leaks in SAL, keep a list of all state owners
and stateids. When clientid reaper thread has removed all clientids,
print the contents of the lists (which should be empty) to expose any
leaks.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>

Conflicts:

	src/SAL/nfs4_recovery.c

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Document FSAL options in GPFS sample config and remove obsolete GPFS options

The FSAL and FileSystem blocks in the config file are documented with
commented out examples that show the default value.

The GPFS block now has no variables.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Strip out unused NFS_Core_Param

Strip out unused nb_current_gc_workers and Nb_MaxConcurrentGC config parm

Strip out FSAL_Shared_Library

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Document Cache Inode and NFS Core parameters

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Allow read/write for the owner of the file

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Fix sub-dir mount issue for v3

Mount needs to do permission checking once it has an export entry
matching the mounted path. We actually skip any permission
checking at this time, simply creating root credentials. That may
not be quite right for all scenarios but will do for now.

NFS Illustrated essentially implies mount requests should not be
denied, and that many servers allow AUTH_NULL mount requests.

Note that a sub-dir mount COULD skip into a directory that is
not normally accessible from the client if it mounted the root
of the export.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>