> On 02/22/2017 04:53 AM, patrice.lu...@cea.fr wrote: > > Hi Frank, > > > > > > As I said yesterday during our last concall, I realized that the > > current FSAL_PROXY use the v4 protocol and not the v4.1. My previous > > submitted patchs to implement support_ex assumed FSAL_PROXY was > using v4.1. > > > > > > Considering differences in v4 and v4.1, I don't see how doing a > > "truncate" in open2 or in setattr2 in v4 with simply a handle and > > without a valid state. To set size with a setattr (in v4 as in v4.1), > > you need a valid state. This state could be the current one in a > > compound request with an open before the setattr. But, if there is no > > way to open a file by handle in v4, how can I do this setattr ? Do you > > have any idea about solving this problem ? How can we successfully > > truncate a file in FSAL_PROXY following this first "quick and dirty" > > version of support_ex that ignores states from the background NFS server > ? > > > > I see no other solution than : > > > > 1) upgrading this first version of FSAL_PROXY support_ex to one really > > saving state from the background NFS server, > > > > or > > > > 2) upgrading FSAL_PROXY protocol from v4 to v4.1. > > > > > > My vote is 2. I don't see a need to support v4.0 at this point, we should just > stick to v4.1.
I've had a chat with Bruce Fields and looked at the knfsd code also. My conclusion based on that discussion is that SETATTR with special stateid should always be fine. I think this text from the RFC: "A valid stateid SHOULD always be specified. When the file size attribute is not set, the special anonymous stateid MAY be passed." Is just confusing us. The discussion of the special stateids in Section 9.1.4.3 mentions SETATTR but doesn't say anything about what type of SETATTR. I really see no reason why a client should be allowed to append to a file with WRITE and a special stateid but would not be allowed to truncate the file with the same stateid... In other words, don't stress about having to open the file. Once we have full state support, we should pass the state through if non-special. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel