From: Harshavardhana <harsha@gluster.com>
To: kreijack@libero.it
Cc: Goffredo Baroncelli <kreijack@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH][TAKE-1] fs/btrfs: Return EPERM for rmdir on subvolumes and snapshots
Date: Fri, 09 Apr 2010 11:39:22 -0700 [thread overview]
Message-ID: <4BBF745A.9090602@gluster.com> (raw)
In-Reply-To: <201004091958.36715.kreijack@libero.it>
On 04/09/2010 10:58 AM, Goffredo Baroncelli wrote:
> Can I suggest to return -EINVAL instead of -EPERM ?
> To me EPERM seems that the user don't have the right to perform an action. But
> the problem is that "rm" is not the right command to use in order to delete a
> subvolume.
>
> As side note, what is the reason for which an user is able to create a
> subvolume, but not to destroy it ?
>
> BR
> Goffredo
>
>
We can decide on that, but let me explaing in more detail.
From what i understood is that since when you are not allowed to delete
the volume or a snapshot by "rmdir" (conventional means). Then it is
perfectly safe to call it EPERM as it would be as if suggesting
"pathname" doesn't support removal of directories.
EINVAL is a for other needs which i feel is not suitable in the current
case.
There is another scenario of what if btrfs_rmdir itself can call subvol
removal ioctl for snapshots and subvolumes in case someone issues a
rmdir on such directories.
Suggestions please.
Regards
--
Harshavardhana
http://www.gluster.com
next prev parent reply other threads:[~2010-04-09 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 22:47 [PATCH][TAKE-1] fs/btrfs: Return EPERM for rmdir on subvolumes and snapshots Harshavardhana
2010-04-09 17:58 ` Goffredo Baroncelli
2010-04-09 18:39 ` Harshavardhana [this message]
2010-04-09 18:54 ` Goffredo Baroncelli
2010-04-09 21:07 ` Harshavardhana
2010-04-09 21:13 ` Harshavardhana
2010-04-09 21:42 ` Goffredo Baroncelli
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=4BBF745A.9090602@gluster.com \
--to=harsha@gluster.com \
--cc=kreijack@gmail.com \
--cc=kreijack@libero.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.