btrfs: unable to delete empty directory

Bug #624911 reported by Kai Blin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

When trying to delete an empty directory on a btrfs partition I'm getting the following error:

root@ceph-mds:~# rm -rf /data/old/
rm: cannot remove `/data/old/broken': Directory not empty

However:

root@ceph-mds:~# ls -la /data/old/broken/
total 0
drwxr-xr-x 1 root root 0 2010-08-26 07:29 .
drwxr-xr-x 1 root root 12 2010-08-26 22:10 ..

Also, I don't fully understand why rm -rf would care about non-empty directories.

I've since upgraded the kernel twice with the maverick updates, so I also rebooted twice, no change. So it's not some file that was deleted but is still opened by some process. I've tried btrfsck, but that didn't complain either.

Currently trying if I can reproduce this on another machine. Unfortunately /data simply is part of the / partition, so reformatting would be a bit annoying. Can do if needed, of course.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-image-2.6.35-19-server 2.6.35-19.25
Regression: No
Reproducible: No
ProcVersionSignature: Ubuntu 2.6.35-19.25-server 2.6.35.3
Uname: Linux 2.6.35-19-server x86_64
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
CurrentDmesg:

Date: Thu Aug 26 21:56:04 2010
Frequency: This has only happened once.
InstallationMedia: Ubuntu-Server 10.10 "Maverick Meerkat" - Alpha amd64 (20100804.3)
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: innotek GmbH VirtualBox
PciMultimedia:

ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.35-19-server root=/dev/sda2 ro quiet
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:
dmi.product.name: VirtualBox
dmi.product.version: 1.2
dmi.sys.vendor: innotek GmbH

Revision history for this message
Kai Blin (kai.blin) wrote :
Revision history for this message
Kai Blin (kai.blin) wrote :

Ok, this is reproduceable with the latest ceph git tree.

If you build the ceph sources, and then call mkcephfs -c ceph.conf with the osd configuration pointing to /data/osd0, you'll end up with /data/osd0/current, which can't be deleted.

It can be renamed, making it end up with the filename the previous post shows. I was using the same series of commands before.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Kai,

If you could also please test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu development release http://cdimage.ubuntu.com/daily-live/current/ . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.