Yes, I checked the latest code immediately after posting this. The
latest code is handling it correctly.

- Sriram

On Mon, Mar 13, 2017 at 11:02 PM, Frank Filz <ffilz...@mindspring.com> wrote:
>> This is all different in 2.4 and later, where MDCACHE takes out much of
> this
>> special handling.  I suspect it's correct now.
>
> Support_ex also should have improved various create scenarios.
>
> I'm working on an even more improved create, but it's been hung up with
> issues for 9P...
>
> Frank
>
>> On 03/13/2017 12:15 PM, sriram patil wrote:
>> > Hi,
>> >
>> > According to POSIX semantics, when open is does with O_CREAT and
>> > O_EXCL then it should return EEXIST. But, ganesha always expects fsal
>> > layer to return EEXIST from create if the file already exists. This is
>> > handled in cache_inode_create. If fsal create returns EEXIST then
>> > ganesha does a lookup and checks for the type of file and then returns
>> > the entry if the type matches.
>> >
>> > On the other hand, if fsal create does not return error even if the
>> > file exists (non O_EXCL semantics), ganesha goes ahead and tries to
>> > add a directory entry (cache_inode_add_cached_dirent), which returns
>> > CACHE_INODE_ENTRY_EXISTS and create fails!
>> >
>> > A simple way to reproduce this is, mount same export on two different
>> > clients and do the following steps to reproduce.
>> >
>> > client1:/mnt> echo abc > testfile
>> > client2:/mnt> echo abc > testfile
>> > bash: testfile: File exists
>> >
>> > I think ganesha should ignore the return status of
>> > cache_inode_add_cached_dirent if it is CACHE_INODE_ENTRY_EXISTS (This
>> > is already done in cache_inode_lookup_impl). This way the EEXIST error
>> > will not be propagated to nfs-client.
>> >
>> > Thanks,
>> > Sriram
>> >
>> > ----------------------------------------------------------------------
>> > -------- 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
>> >
>>
>>
>>
> ----------------------------------------------------------------------------
> --
>> 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
>
>
> ---
> 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

------------------------------------------------------------------------------
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

Reply via email to