need to remove from the state_blocked_locks list

Port from 1.5.x:
cfff76cd0ebd45739107d6974cec1f524df166c3

Signed-off-by: rong zeng <rongzeng@us.ibm.com>

Conflicts:

	src/SAL/state_lock.c

Signed-off-by: Rong Zeng <rongzeng@us.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.

Port from 1.5.x:
5ada096bd2f67613c0b485c2b24aa198f0f23150

Signed-off-by: rong zeng <rongzeng@us.ibm.com>
GRANTED_RES does not have file handle, so no check for export or credential.

Port from 1.5.x:
8eaf450bf7c5701453778d866d7552fdc2991057

Signed-off-by: rong zeng <rongzeng@us.ibm.com>
Strip Old API GPFS Files

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Scrub log messages for SAL and NLM

Make some error messages non-debu

Ported from 1.5.x: 43071e5d5c7282693928ee5d523e9b71cec1541a

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
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.

Ported from 1.5.X: 57b943d0833baddacc0f60b4456669a2dca8e92c

Conflicts:

	src/Cache_inode/cache_inode_lru.c
	src/SAL/nfs4_state.c
	src/SAL/state_lock.c
	src/SAL/state_share.c
	src/include/cache_inode_lru.h

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Reorganize stateid.other so clientid4 is part of it

This allows us to determine if the stateid belongs to an existing
clientid or not. If not, assume the clientid was expired.

Ported from 1.5.X: e042bbe6b557172f09ae5b9030d78f660e0b2b34

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Simple fix for NFS v4 CLOSE replay

If we get a NFS4ERR_BAD_STATEID as a result of looking up the stateid
in close, choose to interpret it as a replayed close (an original close
would have deleted the stateid, but this stateid is for a valid clientid
and is of the right epoch).

Ported from 1.5.X: c627bbeaca151f80c367c120a4526e87100c41a1

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Be verbose about what is happening to core limit

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

Ported from 1.5.X: e87e24068fb88cb4d957da9d33f29e4927e7c9c0

Conflicts:

	src/MainNFSD/nfs_init.c

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Initialize some GPFS data for valgrind memcheck

Ported from 1.5.X: c28a931122db45de2944ec4cc85df12315ccb42a

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Initialize handle in GPFSFSAL_UP_Thread for valgrind

Ported from 1.5.X: 10aa6c83776f65eb6667ecb5884e7881ff6635c4

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Properly copy NFS v4 conflicting lock owner

Ported 1.5.X: 8982d8e1f3367abd4aa7ea9525596942cb6bdd11

Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Fix up valgrind memcheck after GPFS handle key was changed

Ported from 1.5.x: add8058bd3680708d4b1bc6cda5806555083a191

Signed-off-by: Frank Filz <ffilz@us.ibm.
Signed-off-by: Allison Henderson <achender@vnet.linux.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Fix return code from cache_inode_commit

Normally somehow this doesn't cause a problem, but under certain
memory situations, the problem was exposed. Fix is clear from
code inspection...

Ported from 1.5.x: de92d1999d5b7ef11ae50510cce009749a9cbcb6

Signed-off-by: Allison Henderson<achender@linux.vnet.ibm.com>
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
If lookup fails and error is not CACHE_INODE_NOT_FOUND, return
immediately.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Changed src/Docs/15to20-porting.txt according to the ported patches.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Don't refcnt dupreq entry with status DUPREQ_BEING_PROCESSED. Otherwise refcnt
will stay positive and plug the DRC retiring all entries behind.

Ported from 1.5.x:
60c5e1598df773c753992811d967d45608b32133

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Merge branch 'tp/jv27-ports' into ibm_next_20_tmp
Merge branch 'tp/rz_dev33_0515' into ibm_next_20_tmp