Subject: [nfsv4] yet more delegation stuff

From: [email-masked]
Date: Fri, 8 Aug 2003 21:11:39 -0400 (EDT)

Hi,

> Maybe Dave N. can recap the scenarios he was thinking of when
> suggesting the text about not providing delegations for an openowner
> that needed confirmation. :-)

I think those are quite clear in the RFC. What I'm still going on about is
the following case:

Assume no other client has any state for file X
"P1" on Client A opens X for Reading
					Server Replies with Sor and Srd
					(Open stateid Sor and Read Delegate
					 stateid Srd)
"P2" on Client A opens X for Writing
(Since it only has a Read delegation,
 Client A must do the Open op on the server)
					Server sees it has a Read Delegation
					and is Opening the file for writing
					by "P2".
					(At this point, I don't see why the
					 server can't just issue an Sow for
					 "P2" that allows writing and still
					 remember that Client A also has a
					 Read delegation for X and a Read
					 open for "P1" for X. Since no other
					 client is using X, the Read delegation
					 still correctly says that no other
					 client is changing X, but Client A
					 cannot do locks or write opens locally.)
					It returns Sow for "P2" for writing and
					no delegation.
Now, Client A uses either Sor or
Srd for reading X and Sow for writing
X. At some point it is expected to
Close Sor
Close Sow and
DelegReturn Srd

>From what I can see, the server doesn't need to Recall the Read Delegation
until such time as some other client wants to manipulate the file. It also
cannot issue a Read Delegation for X to any other client, since it has
given "P2" on Client A permission to write the file.

Now, if the consensus is that the combination of Read delegation and
Write open for a file on the same client isn't permitted, then
it could confuse a client, so I should change my code.

I do feel that servers should do Delegation Recalls only when they really
need to, since all it takes is a flakey callback network path to make
a Recall become a pretty nasty situation.

I must admit, from my point of view, Read Delegations aren't often useful
(all they do is allow clients to do Read opens locally) and I'm tempted
to always issue Write Delegations for R/W exported volumes if there is
no sharing of the file between clients and no delegation if there is
sharing. (I can see Read Delegations being useful for Read-only exported
volumes.)

Have I made this altogether too confusing? rick

_______________________________________________
nfsv4 mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/nfsv4