Only define SONAS if building GPFS FSAL

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
NFSv3 - don't return garbage after setattr

If setattr was only changing size then the attributes
are invalid and cannot be used to populate wcc replay.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
NFSv3 - make nfs_SetPostOpAttr sane

There is no need to call nfs3_FSALattr_to_Fattr twice if
the attribute pointer is NULL.

And make nfs_SetPostOpAttr return void - it cannot return
any errors because it deal with them by setting attributes_follow
flag.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
XFS FSAL - deal with O_SYNC

First of all, O_SYNC is now a valid flag so don't fail
open with this flag set. Second, make sure the flag is
passed into open.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Don't waste time printing socket address

If DUPREQ is not at full debug then printing sockaddr is
pure waste of time.
(cherry picked from commit 8b214a05115010e56c0af8d169cf03674294149b)

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
libcidr - avoid buffer underflow

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
NFS access check - don't convert IP to string unless necessary

When checking if a client can access an export delay conversion
of IP address to string until you're absolutely sure it is necessary,
i.e. you're about to check a wildcard entry. Doing it all the time
just burns extra CPU cycles for no gain.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Don't cache idempotent requests

If a request is marked as idempotent then there is no
need to add it to DRC - this saves a lot of work
on read-mostly workloads.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
NFS - return fresh attributes from ACCESS3

ACCESS3 gets attributes from the inode cache and returns them in the
post-op data without checking if they're up-to-date. At the same time
cache_inode_access does gets the attributes from the FSAL but doesn't
provide them to its callers.

To avoid changing lots of code which does not care about attributes in
this case add another function (imaginatively named access2) which can
deliver fresh attributes to ACCESS3.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
NFS - better handling of 'success as failure' errors

Getrid of the unused arguments of nfs_SetFailedStatus (13 arguments for a
function is a bit too much) and make it return OK/DROP. Push all exits
via it - this allows for nfs_RetriableError/nfsErrno to print information
about the caller in the case where status of CACHE_INODE_SUCCESS is
treated as an error.

Also modify nfs3_Error and nfs2_Error to print information about the
calling function in the case where it detects unexpected error.

Signed-off-by: Max Matveev <makc@gmx.co.uk>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Move DRC management to nfs_rpc_execute

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>