dCache / nfs4j

Pure Java NFSv3 and NFSv4.2 implementation
Other
240 stars 76 forks source link

The lock owner is not allowed to be re-created after last lock released #92

Open kofemann opened 4 years ago

kofemann commented 4 years ago

The rfc7530 says:

In the case where no byte-range locking state has been established and the boolean is true, the argument contains an open_to_lock_owner structure that specifies the stateid of the open file and the lock-owner to be used for the lock.

This implicitly means, that when no byte-range locks are associated with a given lock owner, then nfs server should thread that lock owner as non existing, e.g. allowing it to be re-created with new sequence id.

The current implementation validates spec requirement and destroys the lock owner only as a result of RELEASE_LOCKOWNER operation.