[S] Change in ...nfs-ganesha[next]: Fix a bug that NFSv4 returns NFS4ERR_BAD_SEQID when the client reclai...
by Name of user not set (GerritHub)
bingjingc(a)synology.com has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1202160?usp=email )
Change subject: Fix a bug that NFSv4 returns NFS4ERR_BAD_SEQID when the client reclaim the open states
......................................................................
Fix a bug that NFSv4 returns NFS4ERR_BAD_SEQID when the client reclaim the open states
On a high load server, there is a case that Ganasha may return
NFS4ERR_EXPIRED when it verifies the state id and find that the client
lease has expired. However, Ganasha will not free the client lease and
related resources immediately. (Ganesha use a reaper thread to do that
instead.) Once the client renews its lease and tries to reclaim the open
state, Ganesha seems to check the given seqid against the old value
saved in server. As a result, Ganasha returns NFS4ERR_BAD_SEQID.
We propose that there could be a flag to indicate whether the saved
seqid is valid or not and introduce a helper function called
Expire_nfs4_seqid to mark the seqid no longer valid every time when the
server failed to do reserve_lease. Moreover, we just find there is
already a void* pointer representing the similar meanings. We reuse the
pointer and leave comments.
Signed-off-by: BingJing Chang <bingjingc(a)synology.com>
Change-Id: Id5ecdb00cb6083e69d09de797d71e7d9b47403e6
---
M src/SAL/nfs4_owner.c
M src/SAL/nfs4_state_id.c
M src/include/sal_functions.h
3 files changed, 23 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/60/1202160/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1202160?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: Id5ecdb00cb6083e69d09de797d71e7d9b47403e6
Gerrit-Change-Number: 1202160
Gerrit-PatchSet: 1
Gerrit-Owner: bingjingc(a)synology.com