From: Chris Mason <clm@fb.com>
To: Shaun Reich <sreich@kde.org>, <linux-btrfs@vger.kernel.org>
Subject: Re: sub del: directory not empty, even though it is
Date: Mon, 14 Apr 2014 15:14:24 -0400 [thread overview]
Message-ID: <534C3390.10402@fb.com> (raw)
In-Reply-To: <534C2D95.4090103@fb.com>
On 04/14/2014 02:48 PM, Chris Mason wrote:
> We have a pretty long list of reasons why the delete will fail, but the
> not empty one should only pop up if we think this snapshot has a
> reference on something else. I wonder if the mv didn't drop the refs.
>
Ok, latest kernels include this commit:
commit 72de6b5393c15c5228074008bbdc47e92bf6d4f7
Author: Guangyu Sun <guangyu.sun@oracle.com>
Date: Tue Mar 11 11:24:18 2014 -0700
Btrfs: return EPERM when deleting a default subvolume
The error message is confusing:
# btrfs sub delete /mnt/mysub/
Delete subvolume '/mnt/mysub'
ERROR: cannot delete '/mnt/mysub' - Directory not empty
The error message does not make sense to me: It's not about deleting a
directory but it's a subvolume, and it doesn't matter if the subvolume is
empty or not.
Maybe EPERM or is more appropriate in this case, combined with an explanatory
kernel log message. (e.g. "subvolume with ID 123 cannot be deleted because
it is configured as default subvolume.")
Reported-by: Koen De Wit <koen.de.wit@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
And your btrfs-debug-tree output confirms you're trying to delete the
default subvolume.
Pick a new default and it will all work ;)
-chris
next prev parent reply other threads:[~2014-04-14 19:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 16:50 sub del: directory not empty, even though it is Shaun Reich
2014-04-14 18:48 ` Chris Mason
2014-04-14 19:14 ` Chris Mason [this message]
2014-04-14 19:29 ` Shaun Reich
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=534C3390.10402@fb.com \
--to=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sreich@kde.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.