Fix some IPv6 compile issues

Ported from 1.5.x 24d98f405eb8968926abd3f7ac493f5fafed762e

Plus some additional fixes in 9p

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Add multilock tool to Ganesha tree

Ported from 1.5.x 2a943afcaf0dcc33df7cfff4d68f8742e0e92843

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

Ported from 1.5.x c37a802adfdee3705fcc497a4e22b50b9a2963dd

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.

Ported from commit 1.5.x a689549bdd15317dfe405b4683368e99c53108e1

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
With -DDEBUG_SAL, 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.

Ported from 1.5.x d132b61eb49f1e46348417cc32014ba53fb14bad

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

Ported from 1.5.x c9b4b4fd6680e761bbeb4281e1f86664b38cb8aa

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
nfs4_op_secinfo need to handle lookup in pseudo fs.

Ported from 1.5.x e26012c86e4b734f6ce1d377a8e6a7665f2cba60

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Fix Pynfs RPLY5 RPLY7 RPLY12. Allow seqid based replay cache check if
stateid's seqid is one less than curent.

Also added state owner refcounting in open_confirm.

Ported from 1.5.x 045571890bef6d3543c482bdd1d4a168fe895a54

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
fix in compare_nfs4_owner_key.

Ported from 1.5.x fee6fbffffb39e4e9801ccfb868a33b36ff38d65

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
No need to decrement client reference in this routine.

Ported from 1.5.x 9d415e7596010e2d800ff66b04ee5c58e70ccb0d

Signed-off-by: Jim Wahlig <jgwahlig@us.ibm.com>
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Fix V4 export access check. Don't apply check_access to V4 at proc level and fix the check in nfs4_MakeCred
which is invoked in V4 operations.

Ported from 1.5.x 8f63f968aacc493029e3b6792325f182829df083

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
1. wbclient interface change.
2. adding support to get group list for RPCSEC_GSS flavor

Ported from 1.5.x 8c6e757b9f147adb505447ef5df1ad7262e037d5

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Signed-off-by: Frank Filz <ffilz@us.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.

Ported from 1.5.x 49c3ee946a04074f85f1a85621b7b24425ecd1cb

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

Conflicts:

	src/MainNFSD/nfs_worker_thread.c
	src/Protocols/NFS/mnt_Mnt.c
Add additional export debug and prevent duplicate Export_Ids

Ported from 1.5.x 969f09b31278ee81ec59d24d2a23a91a14715994

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

Conflicts:

	src/Protocols/NFS/nfs_proto_tools.c
	src/include/nfs_exports.h
	src/support/exports.c
	src/support/nfs_export_list.c
Strip out some unused cruft from exports

Ported from 1.5.x 39b355c6d3a0d5252c1c6e6aa474b84d5e1e008c

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

Conflicts:

	src/include/nfs_exports.h