phdeniel / nfs-ganesha

NFS-Ganesha, a NFSv3/NFSv4.x/9P file server in User Space
http://nfs-ganesha.sf.net
61 stars 49 forks source link

nfs_Create() doesn't try to handle v3 EXCLUSIVE semantics #97

Closed dzafman closed 8 years ago

dzafman commented 11 years ago

Unlike the v4's open4_create() the v3's nfs_Create() function doesn't support the arg_create3.how.mode == EXCLUSIVE. It should set the verifier in inode fields on create and if it finds them upon cache_inode_lookup() NOT return CACHE_INODE_ENTRY_EXISTS.

According to NFS v3 protocol spec we could return NFS3ERR_NOTSUPP, but that doesn't seem right since we are able to support this for v4 using FSAL.

dzafman commented 11 years ago

We may need to return NFS3ERR_NOTSUPP because looking at a FSAL_VFS, FSAL_POSIX and FSAL_CEPH implementations, the atime/mtime passed in attrib is ignored, so even the v4 exclusive create isn't going to work right.

ffilz commented 8 years ago

Exclusive create does work for NFS v4, I'm not quite sure what you're hitting.

It is a bit dodgy and will be improved in V2.4 with the multi-fd support.