linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@gmail.com>
To: Harshavardhana <harsha@gluster.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH][TAKE-1] fs/btrfs: Return EPERM for rmdir on subvolumes and snapshots
Date: Fri, 9 Apr 2010 23:42:54 +0200	[thread overview]
Message-ID: <201004092342.54329.kreijack@libero.it> (raw)
In-Reply-To: <4BBF9863.50504@gluster.com>

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 cases EBUSY is 
> > returned. 
> Ok i think ENOTSUPP could be another alternative? . This should be ok i 
> guess?


I prefer ENOTSUP and EINVAL to EPERM. 
But the man page of unlink (2) doesn't cite nor EINVAL nor ENOTSUP.

So at this point I have to admit that EPERM could be the best compromise.

But let me highlight that unlink(2) returns -EBUSY when an user try to delete 
a mount-point. This is quite similar to unlink a subvolume.

So my list in order of preference is

1) EBUSY                   -> because it is used when unlink is called on a
			      mount-point and it is in the unlink (2) man page
2) EPERM		   -> because it is in the unlink man page, and it was
                              already discussed
3) ENOTSUP, EINVAL	   -> to me these make a lot of sense. But the man
			      page doesn't cite both of them

BR
Goffredo

> Regards



> -- 
> Harshavardhana
> http://www.gluster.com
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijackATinwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512

      reply	other threads:[~2010-04-09 21:42 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
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 [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=201004092342.54329.kreijack@libero.it \
    --to=kreijack@gmail.com \
    --cc=harsha@gluster.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 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).