All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kinglong Mee <kinglongmee@gmail.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	kinglongmee@gmail.com
Subject: Re: Get "device is busy" when umounting nfsv4 file
Date: Fri, 23 May 2014 10:51:58 +0800	[thread overview]
Message-ID: <537EB7CE.4090600@gmail.com> (raw)
In-Reply-To: <537EB673.3050302@gmail.com>

On 5/23/2014 10:46, Kinglong Mee wrote:
> On 5/23/2014 10:18, Trond Myklebust wrote:
>>
>> On May 22, 2014 10:14 PM, "Kinglong Mee" <kinglongmee@gmail.com <mailto:kinglongmee@gmail.com>> wrote:
>>>
>>> When using NFSv4 on Fedora 20 with latest kernel (3.15.0-rc6+),
>>> I can't umount the mountpoint after only an 'ls' operation.
>>>
>>> [root@localhost ~]# cat /etc/exports
>>> /nfstest        *(rw,no_root_squash,no_subtree_check,insecure)
>>> [root@localhost ~]# mount -t nfs 127.0.0.1:/ /mnt/
>>> [root@localhost ~]# ls /mnt/
>>> nfstest
>>> [root@localhost ~]# umount /mnt/
>>> umount.nfs4: /mnt: device is busy
>>
>> Hi Kinglong
>>
>> Nothing springs out to me. Could you please bisect?
> 
> Trying it on rhel7 with 3.10.0-121.el7.x86_64, 
> also got "device is busy".
> [root@localhost ~]# umount /mnt/
> umount.nfs4: /mnt: device is busy
> 
> Maybe this problem has exist a long time.

I find thant -EBUSY errno is return at,

"fs/namespace.c"
1284 static int do_umount(struct mount *mnt, int flags)
1285 {
1286         struct super_block *sb = mnt->mnt.mnt_sb;
......
1358         if (flags & MNT_DETACH) {
1359                 if (!list_empty(&mnt->mnt_list))
1360                         umount_tree(mnt, 2);
1361                 retval = 0;
1362         } else {
1363                 shrink_submounts(mnt);
1364                 retval = -EBUSY;
1365                 if (!propagate_mount_busy(mnt, 2)) {

propagate_mount_busy return 1 for mnt's refcnt is 3 (bigger than 2).

1366                         if (!list_empty(&mnt->mnt_list))
1367                                 umount_tree(mnt, 1);
1368                         retval = 0;
1369                 }
1370         }

thanks,
Kinglong Mee

      reply	other threads:[~2014-05-23  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23  2:14 Get "device is busy" when umounting nfsv4 file Kinglong Mee
     [not found] ` <CAHQdGtQh0be=_tByxukQAPG3ZRJJ6UDWgRiH7Q+9Ry__5YxzaA@mail.gmail.com>
2014-05-23  2:46   ` Kinglong Mee
2014-05-23  2:51     ` Kinglong Mee [this message]

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=537EB7CE.4090600@gmail.com \
    --to=kinglongmee@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /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.