[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [nfsv4] Asking for details about OPEN_DOWNGRADE
On Mon, 16 Jun 2008, Trond Myklebust wrote:
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.
Flame suit on:-)... Personally, I can't see much point in a posix client
(one always using deny_none) in doing open_downgrades at all. As the
recent discussion has shown, it's a pain to get right and what benefit
does it have?
- Since all opens are deny_none, other clients aren't restricted against
opening the file.
- Unless another client had the file open, the open probably provided a
delegation, so the client is doing opens locally anyhow and just using
Access to check permissions, etc.
- If the file is being opened by other clients, holding the open with
the most access permissions acquired will prevent the other client
being given a delegation. (The case where rw is downgraded to ro and
then another client opens it for reading and gets a read delegation.)
Some might argue this is a case where the open_downgrade is a good thing
to do, but I haven't found read delegations particularily useful and,
if this client wants to "open upgrade" to rw again, the read delegation
just results in extra overhead. As such, I'd argue that just holding
onto the rw open and preventing another client from getting a read
delegation is preferable, or at least "as acceptable".
In summary, I can't see an advantage for the client in doing an
open_downgrade and I can't see what advantage it provides to the server
or other clients, either? (Assuming it's always using deny_none, of
course.)
Comments? rick
_______________________________________________
nfsv4 mailing list
nfsv4 at ietf.org
https://www.ietf.org/mailman/listinfo/nfsv4