Throw out sessions when clientid is expired.

Also use cid_mutex to protect list of sessions.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
TEMP FIX of PYNFS 4.1 SEQ9f

Ganesha currently always caches response so we always provide it even
if client asks not to cache response.

This really should be properly implemented to save us grief.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Improve debug of replayed cache in NFS v4.1

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Implement SECINFO_NO_NAME

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix LKT4

Start of lock for LOCKT was not initialized from request.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix SATT7

If attrlist is empty and attrmask is not empty, we must return NFS4ERR_BADXDR

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix SATT15 - try our best to make change attr change

Fast changes in succession may not change change attr.
Since we don't have a real change attr from most FSALs, we
just detect no change after a SETATTR and change it anyway.

SATT15 actually causes change attr to oscillate betweemn two values
proving this solution isn't actually perfect, but hopefully it's good
enough.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Do minimum implementation for RECLAIM_COMPLETE

We do not shorten grace period, nor do we handle RECLAIM_COMPLETE for
individual file system, but we now pass all existing pynfs 4.1
reclaim_complete tests.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Deprecate Return_Bad_Stateid parameter

Also make nfs_read_version4_conf just warn about invalid config options
and continue to process the config block.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix NFS v4.1 current_stateid

Current stateid follows CurrentFH. Any time CurrentFH is changed,
current stateid must either be changed, or be made invalid.

SAVEFH also saves the current stateid and RESTOREFH restores the
current stateid if the saved stateid was valid.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix refcount issue in nfs4_op_create_session.c

If we update a confirmed clientid, we should not decrement refcount
because we are still using it.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>