* Can't rmdir an empty directory when using overlayfs
@ 2014-08-28 14:22 Francis Moreau
0 siblings, 0 replies; only message in thread
From: Francis Moreau @ 2014-08-28 14:22 UTC (permalink / raw)
To: linux-fsdevel; +Cc: Miklos Szeredi, Andy Whitcroft
Hello,
I've a weird problem when using overlayfs.
The version I'm using is quite old, it's v12 on top of a 3.4 kernel. I
guess the patches are coming from:
http://git.kernel.org/cgit/linux/kernel/git/apw/overlayfs.git/log/?h=overlayfs.v12apw1
Sorry if the version is old but I'm stick with 3.4 and v12 seems the
latest version available for this kernel.
My problem is that I can't rmdir an empty directory, it fails with
'device or resource busy'.
This directory is created by an application and is used to mount a block
device. Once the job is finished the block device is unmounted and
finally app tries to rmdir it.
The directory doesn't seem to be a mountpoint (anymore). Looking in
/proc/mounts confirm this.
I tried to trace what's going on in the kernel when calling the syscall
'rmdir' and found that it's currently failing in vfs_rmdir() when
testing for that particular condition:
error = -EBUSY;
if (d_mountpoint(dentry))
goto out;
If I'm not mistaken, the kernel still thinks that the directory is a
mountpoint.
Another weird behaviour is that if I'm touching/modifying some unrelated
files (not in the directory) before starting my app, then the issue
disappear.
Does this issue seem to be an old known issue ?
Thanks !
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-28 14:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 14:22 Can't rmdir an empty directory when using overlayfs Francis Moreau
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.