Subject: Re: guard on SETATTR

From: Peter Staubach <[email-masked]>
Date: Mon, 18 Jun 2001 10:33:59 -0600 (MDT)

> 
> Does anybody know what happened to the guard
> mechanism for SETATTR that was in V3?  It isn't
> in V4 and I'm wondering why.
> 
> Is it the case that it has turned out to be
> useless (i.e. that no clients use it)?  It doesn't
> appear that it would be difficult for a server to 
> implement so even if it were used only by a few people, 
> it doesn't seem as though there would be a need to 
> remove it from NFS.
> 
> Anybody remember the history here?

The guard mechanism for SETATTR in NFS Version 3 is extremely useful.
It is used by most clients, at least, to protect requests which change
the size of the file.  These requests can cause data loss if a
retransmitted request is not caught properly and is reexecuted.

This sort of functionality is good at reducing the dependence on the
RPC duplicate request processing.

		ps

---

From: Spencer Shepler <[email-masked]>
Date: Mon, 18 Jun 2001 15:50:56 -0500

> retransmitted request is not caught properly and is reexecuted.

Yes.  It is a useful feature.  Since RFC 1813 doesn't mention any
atomic requirements for use of the guard on SETATTR, the NFS version 4
protocol provides for the same functionality by the use of COMPOUND.
Using VERIFY/NVERIFY in combination with SETATTR should provide the
equivalent functionality.  In fact, the client is able to specify more
than just the "time_metadata/ctime" attribute for the check condition.

--

- Spencer -