[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nfsv4] Asking for details about OPEN_DOWNGRADE



On Mon, 2008-06-16 at 16:50 -0700, Steven Huntington wrote:
> Question to the gallery:
> 
> Does all this imply that for open reclaim, the client needs to send
> each individual OPEN reclaim OP as opposed to a single composite OPEN
> for the openowner/FH pair, so that the new instance of the server can
> know what unions are valid and what aren't? In short, does this apply
> to reclaimed open share/deny flags as well as non-reclaimed ("normal")
> ones?
> 
> Cheers,
> 
> Steve Huntington, IBM San Jose

Yes, but assuming that you have applications that are all opening the
same file with a mixture of all three open modes (I'm also assuming you
don't care about the POSIX-incompatible DENY modes), you should be able
to get away with just sending a maximum of 3 OPEN calls per file
+open_owner combination.
i.e.
  - OPEN(OPEN4_SHARE_ACCESS_READ, OPEN4_SHARE_DENY_NONE)
  - OPEN(OPEN4_SHARE_ACCESS_WRITE, OPEN4_SHARE_DENY_NONE)
  - OPEN(OPEN4_SHARE_ACCESS_BOTH, OPEN4_SHARE_DENY_NONE)

That will allow you to downgrade to a READ-only mode once all the O_RDWR
and O_WRONLY descriptors have been closed, or to a WRITE-only mode once
the O_RDWR and O_RDONLY descriptors have been closed.

Cheers
  Trond

Cheers
  Trond

_______________________________________________
nfsv4 mailing list
nfsv4 at ietf.org
https://www.ietf.org/mailman/listinfo/nfsv4