Add lock in nfs-ganesha.gpfs.init to avoid the race where multiple threads edit
epochfile at the sametime, and corrupt it as a result.

Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
We cannot set garray to NULL. it is dynamically allocated.
Also, we can't free it because later we may have to restore it!!
Start grace as soon as IP movement is detected.

Signed-off-by: Poornima Gupte <poornima.gupte@in.ibm.com>
Network attach/detach can assign the IP to any node, including the same
node it got detached from.
If ip gets assigned to different node:
- Client contacts the new node and the epoch from clientid is going to
  differ from that of the server node's. In this case server returns
  STALE_CLIENT_ID and forces client to reclaim their locks.
- If the ip gets assgined to same node, epochs are going to be same
  and server can't find the clientid in its hash table. This results in
  EXPIRED_CLIENT_ID and forcing client not to reclaim. The fix is for
  this case.

Fix: Keep the clientid in the hash table marking it stale. On the first
  attempt to use that client id, delete it from the hash and return
  STALE_CLIENT_ID, this allows client to reclaim locks after
  establishing new clientid.

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