From: Li Zefan <lizf@cn.fujitsu.com>
To: David Sterba <dave@jikos.cz>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: avoid setting ->d_op twice
Date: Wed, 22 Feb 2012 09:29:45 +0800 [thread overview]
Message-ID: <4F444509.5000701@cn.fujitsu.com> (raw)
In-Reply-To: <20120221145229.GI1046@twin.jikos.cz>
David Sterba wrote:
> Hi,
>
> thanks for the patch!
>
> On Tue, Feb 21, 2012 at 05:04:28PM +0800, Li Zefan wrote:
>> Follow those instructions, and you'll trigger a warning in the
>> beginning of d_set_d_op():
>>
>> # mkfs.btrfs /dev/loop3
>> # mount /dev/loop3 /mnt
>> # btrfs sub create /mnt/sub
>> # btrfs sub snap /mnt /mnt/snap
>> # touch /mnt/snap/sub
>> touch: cannot touch `tmp': Permission denied
>
> is this the right error code? permission denied == EACCESS and this is
> returned in case of file
>
> (strace touch file)
>
> open("file", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 EACCES (Permission denied)
>
> while mkdir returns (strace mkdir a-dir)
>
> mkdir("a-dir", 0777) = -1 EPERM (Operation not permitted)
>
>
> The commands were run as root and EPERM looks more adequate than
> EACCESS.
>
This is a different issue, and EPERM is returned by VFS not btrfs.
Feel free to submit a patch to fsdevel for discussion.
prev parent reply other threads:[~2012-02-22 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 9:04 [PATCH] Btrfs: avoid setting ->d_op twice Li Zefan
2012-02-21 14:52 ` David Sterba
2012-02-22 1:29 ` Li Zefan [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=4F444509.5000701@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=dave@jikos.cz \
--cc=linux-btrfs@vger.kernel.org \
/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).