* bug: cannot delete an empty directory (the directory is NOT a subvolume)
@ 2010-11-06 0:27 redneb
0 siblings, 0 replies; only message in thread
From: redneb @ 2010-11-06 0:27 UTC (permalink / raw)
To: linux-btrfs
I think this can be best explained by an example. Suppose that you have
the following setup:
mkfs.btrfs /dev/somedisk
mount /dev/somedisk /mnt/btrfs
mkdir /mnt/btrfs/aaa
btrfs subvolume snapshot /mnt/btrfs /mnt/btrfs/aaa/bbb
So /mnt/btrfs/aaa is a ordinary directory containaing /mnt/btrfs/aaa/bbb
which is a subvolume. The latter contains /mnt/btrfs/aaa/bbb/aaa which
is a directory. This directory is empty (ls -a does not find anything)
but it cannot be deleted:
# rmdir /mnt/btrfs/aaa/bbb/aaa
rmdir: failed to remove `/mnt/btrfs/aaa/bbb/aaa': Directory not empty
As it turns out, it contains a "ghost" directory named bbb that is not
reported by ls -a but can be deleted by rmdir:
# rmdir /mnt/btrfs/aaa/bbb/aaa/bbb
(no errors, status code 0)
Now we can also delete /mnt/btrfs/aaa/bbb/aaa:
# rmdir /mnt/btrfs/aaa/bbb/aaa
(no errors, status code 0)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-06 0:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-06 0:27 bug: cannot delete an empty directory (the directory is NOT a subvolume) redneb
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).