Malahal reported that it's possible to have multiple lock stateids for the
same lock owner/file combination.

I'm not quite sure where the problem is, but here's a fix that will prevent
races between FREE_STATEID and LOCK/new lock owner for NFS v4.1.

Malahal, if you could find out more about what the path in your case is,
perhaps we can amend this new logic to fix it. There must be some issue with
LOCK/new lock owner, though I know you are on 4.0 which doesn't have
FREE_STATEID.

Interestingly, in 4.0, if all locks had been released on a stateid, and then
the client issued a LOCK/new lock owner, and that LOCK request fails,
Ganesha will NOW free the stateid... (that was true before my patch - we
always delete the stateid on lock failure when new lock owner was requested,
even if we found an existing stateid).

I wonder if we have any path where 4.0 issues concurrent LOCK/new lock owner
requests? I don't think that should happen because of the open owner seqid
sequencing, but maybe it can happen. In that case, if one lock succeeded and
the 2nd failed, the stateid could be destroyed along with the held lock...

Here's my patch:

https://review.gerrithub.io/#/c/379421/


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to