ntrishal@in.ibm.com has uploaded this change for review.

View Change

WIP: NFS4ERR_EXPIRED loop caused when RENEW is after lease interval

If a RENEW request comes after the lease interval time, the
cid_last_renew is set to a higher value.

Reaper runs every 10 secs.

If client sends a SETCLIENTID before these 10 secs, we find the existing
record and reuse (as part of Case 2) of nfs4_op_setclientid() function.

nfs4_op_setclientid_confirm() relevant path is - First try to look up
unconfirmed record. And then make sure we have a reference to the
confirmed clientid record if any. (Line 330)
This has the old lease renewal time in it.

SETCLIENTID CONFIRM returns NFS_OK.
OPEN fails in reserve_lease() with NFS4ERR_EXPIRED.
Next RENEW comes and again fails with NFS4ERR_EXPIRED.

Above sequence keeps repeating.

Once the reaper runs, the old entry is removed and SETCLIENT sends back
a new ClientID and client comes out of this situation.

Reset the cid_last_renew when we confirm the client so that client
gets the correct lease interval to renew its lease. And also
reaper should not remove this entry as well in its next run.

Change-Id: I6b4c5c39aa804b3bad60d584daa1d56dd62c6d8b
Signed-off-by: Trishali Nayar <ntrishal@in.ibm.com>
---
M src/Protocols/NFS/nfs4_op_setclientid_confirm.c
1 file changed, 2 insertions(+), 0 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/13/445113/1

To view, visit change 445113. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I6b4c5c39aa804b3bad60d584daa1d56dd62c6d8b
Gerrit-Change-Number: 445113
Gerrit-PatchSet: 1
Gerrit-Owner: ntrishal@in.ibm.com
Gerrit-MessageType: newchange