All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francis Moreau <francis.moro@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: Miklos Szeredi <miklos@szeredi.hu>, Andy Whitcroft <apw@shadowen.org>
Subject: Can't rmdir an empty directory when using overlayfs
Date: Thu, 28 Aug 2014 16:22:11 +0200	[thread overview]
Message-ID: <53FF3B13.3060103@gmail.com> (raw)

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 !

                 reply	other threads:[~2014-08-28 14:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=53FF3B13.3060103@gmail.com \
    --to=francis.moro@gmail.com \
    --cc=apw@shadowen.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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.