Hi Olga, On Thu, 2020-05-28 at 16:42 -0400, Olga Kornievskaia wrote: > Hi folks, > > Looking for recommendation on what the client is suppose to be doing > in the following situation. Client opens a file and has a byte-range > lock which returned a locking state. Client is acquiring another byte > range lock. It uses the returned locking stated for the 2nd lock. > Server returns ADMIN_REVOKED. > > Currently the client goes into an infinite loop of just resending the > same LOCK operation with > the same locking stateid. > > Is this a recoverable situation? The fact that the lock state was > revoked, should it be an automatic EIO since previous lock is lost > (so > why bother going forward)? Or should the client retry the lock but > send it with the open stateid? > > Thank you. I think the right behaviour should be to just call nfs_inode_find_state_and_recover(). In principle that will end up either recovering the lock (if the user set the nfs.recover_lost_locks kernel parameter to 'true') or marking it as a lost lock, using NFS_LOCK_LOST. Cheers Trond -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.myklebust@xxxxxxxxxxxxxxx