Subject: [nfsv4] NFSv4.0: CLOSEing a file using a stateid returned by LOCKU

From: Saul Tamari <[email-masked]>
Date: Wed, 6 Feb 2013 13:13:31 -0500

Hi,

Is the following sequence legal? Is CLOSE supposed to close a file
using a stateid that was returned from a byte-range locking operation?
OPEN -> returns stateid1
OPEN_CONFIRM -> returns stateid2
LOCK -> returns stateid3
LOCKU -> returns stateid4
CLOSE(stateid4)

Thanks,
Saul

---

From: "Myklebust, Trond" <[email-masked]>
Date: Wed, 6 Feb 2013 18:25:32 +0000

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On Behalf
> Of Saul Tamari
> Sent: Wednesday, February 06, 2013 1:14 PM
> To: [email-masked]
> Subject: [nfsv4] NFSv4.0: CLOSEing a file using a stateid returned by LOCKU
> 
> Hi,
> 
> Is the following sequence legal? Is CLOSE supposed to close a file using a
> stateid that was returned from a byte-range locking operation?
> OPEN -> returns stateid1

No. That should probably be rejected with an NFS4ERR_INVAL. You can only use open stateids with the CLOSE operation.

Cheers
  Trond