Restructures .so files and fixes all compile-time warnings
in CCL code.
Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Sync'ing fsi_ipc_ccl.h and fsi_ipc_common.h with PT server build

- Added CCL_MAX_CLOSING_TO_CLOSE_POLLING_COUNT to fsi_ipc_ccl.h
- Added CCL_CLOSING to fsi_ipc_common.h

Signed-off-by: Hin Lam <hincheuk@us.ibm.com>
fix a locking bug, though not the one I was looking for.

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
1. Fix in atomic_store_xxx_t: pass value to __sync_lock_test_and_set. This was causing
   nsm_client not able to turn on monitor flag.
2. Change nsm timeout from 5 to 25 seconds.

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
In cache_inode_dec_pin_ref, close file when refcount goes to 0. A parameter is added
to only allow nlm_Unshare to utilize this logic.

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Avoid deadlocks and lru_thread hang my making sure that it won't process the
entry until it is ready.  Also move lock initialization to cache_inode_lru_get.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Signed-off-by: Jim Wahlig <jgwahlig@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Use cache_inode_getattr to obtain attributes instead of assignment,
otherwise there is a race condition for attributes.

Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
check for error from write before doing the commit

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>
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>
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>
1. in lru_thread, instead of repeating processing the same entry, go to next lane.
2. Fixed order of unlocking of mutex and content_lock.

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