Fix use of current stateid

NFS v4.1 Adds a new special stateid: other=0, seqid=1. This stateid indicates
to use the "current stateid" from the last operation that returned a stateid.

There were two problems, first, CLOSE did not request to allow that stateid
because it was using the wrong flag constants.

Second, when we found a valid current stateid, we did not escape to check
it properly.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Update DBus and ganeshactl README.

Refer users to the wiki for admin help.

Signed-off-by: Jim Lieb <jlieb@panasas.com>
Fix PsuedoFS LOOKUPP of root

Root is no longer pseudo_id == 0, so need different root detection.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fix handling of empty file handle

We should check nfs_fh4_val == NULL to indicate if there is a file handle
buffer or not, not nfs_fh4_len == 0.

That allows us to set nfs_fh4_len = 0 to "empty" the file handle while
leaving the buffer intact.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
NFS v4.1 SECINFO must empty CurrentFH

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
DESTROY_CLIENTID must be only operation

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
CID#18075 Unchecked return value from library in nfs_rpc_cb_init_ccache

mkdir may fail for various reasons (most obvious would be if target
directory already exists). Here we simply add a log message.
Call clean_credentials after rpc_execute is done.

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

Ported from 1.5: 701057dd

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Convert root/<hostname> and host/<hostname> to root along with
nfs/<hostname>

Signed-off-by: suhrud <supatank@in.ibm.com>

Ported from 1.5: 70f98bf36af6499af4d3bbde9ddb4c7d2ca39cb1

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Fixed typo for return value of memcmp.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Group is not changed when both owner and group are changed in single setattr.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>

Ported from 1.5: 87a2bb8d4d614f29cab414e420bd80cf11df4708

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Fix project versioning in configuration

Also add extra versioning for dev/rc tracking

Signed-off-by: Jim Lieb <jlieb@panasas.com>
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>