Rojin George has uploaded this change for review. (
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1193683?usp=email )
Change subject: Handle parallel delegation recalls for the same fsal_objs
......................................................................
Handle parallel delegation recalls for the same fsal_objs
There were multiple delegation recalls happening for the same
obj. The first thread enters with state lock to recall, once found
that it could expire off the client which has gone inactive, we
were releasing the state lock and setting DELEG_GRANTED for the
state->state_data.deleg.sd_state, before actually expiring the
client. This opens up window to the contending async task to acquire
the same state lock and crash off, as it started dereferencing the
clientid related structures which would have gone stale,
as part of the first threads client expire path.
This CR avoids such contenders by just cleaning the conflciting state
off the expired client to revoke the delegation and if lease reservation
fails then we set the state to DELEG_GRANTED so that reaper would be
able to clean up the states associated with the expired clients properly.
Change-Id: Id3c11ac12f24cc777b2ef95e89e99dc10a5ab958
Signed-off-by: Rojin George <itsmerojin(a)gmail.com>
---
M src/FSAL_UP/fsal_up_top.c
1 file changed, 32 insertions(+), 21 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/83/1193683/1
--
To view, visit
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1193683?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: Id3c11ac12f24cc777b2ef95e89e99dc10a5ab958
Gerrit-Change-Number: 1193683
Gerrit-PatchSet: 1
Gerrit-Owner: Rojin George <itsmerojin(a)gmail.com>