Fix building rpms on RHEL. Add GPFS build config. Enable GPFS by default.
Use atomic inc for new_clientid and new_clientid_verifier

Also correct function name for new_clientid_verifier.

Ported from 1.5 5f67b48645e840c4d502eec440d7e0c3fe26d647

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Temp change to return NFS4ERR_BAD_STATEID before clientid is included in stateid for better judgement

Ported from 1.5 ef7e31d8c9ffca379c5e08d8f06300b949001c9d

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Remove dead nfs_tools code

Ported from 1.5 d213b1dc0193beaf88e184c4481f2f52ac1fe3eb

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Grace period should be >= Lease_lifetime.
For environments which have issues with grace period more than 60 seonds,
Lease_Lifetime in main.conf can be changed to a smaller value.

Ported from 1.5 71249367cdabac404425a74907900c143bd722cb

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Convert ETXTBSY to ERR_FSAL_SHARE_DENIED instead of FSAL_FILE_OPEN.
For v4 it will be converted to NFS4ERR_SHARE_DENIED.
For v3 it will be converted to NFS3ER_JUKEBOX, which will allow a client to wait
for the share reservation to be released.

Ported from 1.5 35b1a70bacdc777b4fd2fa056a4753220a7e24c7

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Don't allow OPEN of a PseudoFS file

Also, return a better error for nfs_FhandleToCache failures.

Ported from 1.5: 9075bee497b67ec1cd0826cda097d6e0de3cf89a

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Fixed byte range lock merging when up- or downgrading sub-ranges

Ported from 1.5: 44aab46665eee745cda796cd73cd96e34210d644

Signed-off-by: Manfred Haubrich <haubrich@de.ibm.com>
Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Fix OPNDG10

Two issues:

1. OPEN CREATE UNGUARDED did not reuse existing state
2. state_share_upgrade did not create union of old access and new access

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