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
Ok,
I read the unlink (2) man page which says:
[...]
EBUSY (not on Linux)
The file pathname cannot be unlinked because it is being used by
the system or another process and the implementation considers
this an error.
[...]
EPERM The
On 04/09/2010 11:54 AM, Goffredo Baroncelli wrote:
EBUSY (not on Linux)
The file pathname cannot be unlinked because it is being used by
the system or another process and the implementation considers
this an error.
[...]
EPERM The
On 04/09/2010 02:07 PM, Harshavardhana wrote:
EBUSY is again meant for different reason where in a super block is
being locked or accessed by an Application which would mean unref on
that block would cause Application to go nuts. In such cases EBUSY is
returned.
Ok i think ENOTSUPP could be
On Friday 09 April 2010, Harshavardhana wrote:
On 04/09/2010 02:07 PM, Harshavardhana wrote:
EBUSY is again meant for different reason where in a super block is
being locked or accessed by an Application which would mean unref on
that block would cause Application to go nuts. In such
Break the conditional to return EPERM for subvolumes,snapshots and
ENOTEMPTY for normal directories with files.
Signed-off-by: Harshavardhana har...@gluster.com
---
fs/btrfs/inode.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/inode.c