Fix creds problem in nfs4_MakeCred

A local copy of credentials was used for part of the credential work in
nfs4_MakeCred. Use the copy of the credentials in the req_ctx in all
places.

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Rename _DEBUG_MEMLEAKS to DEBUG_SAL and make functional in cmake

The DEBUG_SAL cmake option compiles in some additional heavyweight
debug code in SAL to track all locks (stateids and state owners to
come).

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
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>
Update porting doc to reflect ffilz-1.5-to-2.0-push-1

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Restore timestamping entry into request queue

Change timestamp from timeval to timespec.
move time_queued from nfs_request_data_t to request_data_t so
everybody can use it.
Fix logic for calculating queue wait.  It is time_start - time_queued
not time_end - time_queued

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Merge remote-tracking branch 'linuxbox2/next' into merge_next

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Merge remote-tracking branch 'ffilz/ffilz-1.5-to-2.0-push-1' into merge_next

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Zap cache_inode_weakref.

The use of weakrefs mad log-term reference simple, but came
added a couple of kinds of overhead.  Using ordinary FSAL
keys (augmented by exportid, see below) as dirent reference
removes a lookup table, and streamlines several code paths.

Thanks to Eldar Kleiner <eldark@infinidat.com> for the analysis.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Simplify cache_inode_new_entry slightly.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add emacs backup files to .gitignore

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Remove yet another (really old) copy of PyNFS

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Clean up scripts directory

Remove scripts to run test programs that no longer exist to test code
that no longer exists (such as the LRU list) as well as scripts for
the no-longer-in-existence Ganeshell.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>