Remove broken conflict detection.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
[Fixed strict compile errors]
Add FSAL delay during delegation recalls. Skip deleg policy for now.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
If export supports delegations but FS doesn't, detect conflicts.

Also moved if statement to assert.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
[fixed compile issues]
Add delegation recall for FSALs not supporting delegation.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
[fixed compile issues]
Delegation: Add support to detect and handle open-recall race.

Implements Section 10.4.5 of RFC 3530bis 25.
If the first async recall fails with NFS4ERR_BADHANDLE, then the server
synchronously retries for Deleg_recall_race_retry_count(config var)
times with a delay of Deleg_recall_retry_delay(config var).

After a successfull recall, the server will wait for one
lease_lifetime before revoking the delegation if the client has
not returned it.

If the recall was not sucessfull the server will wait for two
lease_lifetimes to give enough time to the client to reestablish
a failed callback channel after NFS4ERR_CB_PATHDOWN.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
[fixed compile issues]
Added config vars for delegation recalls.

deleg_recall_retry_count: Number of times the server to try to recall
before revoking. default:3
deleg_recall_retry_delay: Number of seconds the server will wait before
retrying a recall.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Added delegation revoke support.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Use current struct rather than default struct for gpfs config.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Delegation: Do not return before actually unlocking the file.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Use proper free function for rpc calls and initialize call variable.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Use correct function to free rpc call.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Serialize delegrecall and delegreturn.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
[fixed compile issues]
Do not specify truncate during deleg recall.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Do not free garbage pointer.

Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
Fix BAD_STATEID errors

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
finish subtract_deleg_from_list()

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
[fixed compile issues]
Change variable name to make code easier to read

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
recall() paths review

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Changed eval_revoke to eval_deleg_revoke

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

- Compilation fixes
- Dead code Removal
- clientfile_deleg_heuristics -> cf_deleg_stats
- Added sd_ prefix to all the elements of state_deleg_t

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