linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jean-Pierre André" <jean-pierre.andre@wanadoo.fr>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Sage Weil <sage@inktank.com>,
	fuse-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org
Subject: Re: [fuse-devel] [PATCH] vfs: fix propagation of atomic_open create error on negative dentry
Date: Thu, 16 Aug 2012 11:51:02 +0200	[thread overview]
Message-ID: <502CC286.8040001@wanadoo.fr> (raw)
In-Reply-To: <87has3dx1c.fsf@tucsk.pomaz.szeredi.hu>

Hi,

Miklos Szeredi wrote:
> Sage Weil<sage@inktank.com>  writes:
>
>
>> Hi Miklos,
>>
>> I found some time to track down the O_CREAT error code issue.  Patch is
>> below.  Does this look correct?
>>
>> I was reproducing with
>>
>>   ceph-fuse mnt
>>   mkdir -p mnt/a
>>   cd mnt
>>   .../pjd-fstest-20080816/fstest -u 65534 -g 65534 open a/foo O_RDONLY,O_CREAT 0644
>>
>> EACCES is expected, ENOENT was returned instead.
>>
> I don't quite undersdand what is happending here.
>
> Why does ceph-fuse return ENOENT here?  Returning ENOENT for O_CREAT
> only makes sense if the parent directory doesn't exist, but that's not
> the case here.
>

In this test, the parent directory exists, but it is not
writable by the process which tries to create the file.

According to opengroup, from
http://pubs.opengroup.org/onlinepubs/000095399/functions/open.html


    The /open/() function shall fail if:

    [EACCES]
        Search permission is denied on a component of the path prefix,
        or the file exists and the permissions specified by /oflag/ are
        denied, or *the file does not exist and write permission is
        denied for the parent directory of the file to be created*, or
        O_TRUNC is specified and write permission is denied.


Regards

Jean-Pierre


      parent reply	other threads:[~2012-08-16  9:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.00.1208110953090.32057@cobra.newdream.net>
2012-08-15 20:24 ` [PATCH] vfs: fix propagation of atomic_open create error on negative dentry Sage Weil
2012-08-16  9:08   ` Miklos Szeredi
2012-08-16  9:18     ` Miklos Szeredi
2012-08-16 16:36       ` Sage Weil
     [not found]         ` <alpine.DEB.2.00.1208160910160.27759-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2012-08-16 17:09           ` Miklos Szeredi
2012-08-16  9:51     ` Jean-Pierre André [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502CC286.8040001@wanadoo.fr \
    --to=jean-pierre.andre@wanadoo.fr \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=sage@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).