Subject: Questions about FH ops (GETFH, SAVEFH, PUTFH, RESTOREFH)

From: "Noveck, Dave" <[email-masked]>
Date: Thu, 2 Sep 1999 08:10:39 -0700

I have questions about the ops to support the current 
file handle concept.

First, what happens if I haven't set up a current file
handle?  Is there a default or is this an error?

The fact that GETFH has no error listed besides
SERVERFAULT (i.e no INVAL) seems to indicate that there
is a default, since there is no way to indicate that
a bare GETFH (i.e. without a preceeding PUTFH) would be 
invalid.  Have I missed where the default is explained?  
The obvious default is the public file handle but I 
couldn't see anywhere where the spec says that.

Another question has to do with the error list for 
SAVEFH.  I can't make sense of a lot of the
errors that are there.  I would argue that the error
list should be the same as GETFH.  I'm assuming that
GETFH does not have errors like FHEXPIRED, BADHANDLE,
WRONGSEC, etc. since the error should have been 
generated when the handle was established rather than
at GETFH.  If so, SAVEFH is precisely in the same
position.  GETFH and SAVEFH both move a current 
handle somewhere else and I don't see why they should
differ in whether or not they check that handle for
validity.  You could argue that because of the lack
of atomicity for COMPOUND a handle can expire or go
stale between ops and so it might become invalid
before the SAVEFH but the same applies to GETFH. 
Also, I don't understand what INVAL is for in the 
error list for SAVEFH.

I have a similar question about the error lists for
PUTFH and RESTOREFH.  They are similar in that they
both set the current file handle.  With RESTOREFH,
the file handle in question must have been valid at
one time so there is a possibility that some types
of errors that PUTFH returns might not be possible
for RESTOREFH, but (except for the case of INVAL),
the reverse should not be possible.  If RESTOREFH
checks for FHEXPIRED, for example, so should PUTFH.
If the idea is that this needs to be checked when
the handle is used, as opposed to set, the the same
thing should apply to RESTOREFH.

---

From: Mike Eisler <[email-masked]>
Date: Thu, 2 Sep 1999 08:45:14 -0700 (PDT)

> handle?  Is there a default or is this an error?

error.

> couldn't see anywhere where the spec says that.

The spec should say INVAL.

> Also, I don't understand what INVAL is for in the 

If there isn't an fh to save, then INVAL is appropriate.

> thing should apply to RESTOREFH.

Agreed.