linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Get "device is busy" when umounting  nfsv4 file
@ 2014-05-23  2:14 Kinglong Mee
       [not found] ` <CAHQdGtQh0be=_tByxukQAPG3ZRJJ6UDWgRiH7Q+9Ry__5YxzaA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Kinglong Mee @ 2014-05-23  2:14 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs, kinglongmee

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Get "device is busy" when umounting nfsv4 file
       [not found] ` <CAHQdGtQh0be=_tByxukQAPG3ZRJJ6UDWgRiH7Q+9Ry__5YxzaA@mail.gmail.com>
@ 2014-05-23  2:46   ` Kinglong Mee
  2014-05-23  2:51     ` Kinglong Mee
  0 siblings, 1 reply; 3+ messages in thread
From: Kinglong Mee @ 2014-05-23  2:46 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Linux NFS Mailing List, kinglongmee

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.

thanks,
Kinglong Mee

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Get "device is busy" when umounting nfsv4 file
  2014-05-23  2:46   ` Kinglong Mee
@ 2014-05-23  2:51     ` Kinglong Mee
  0 siblings, 0 replies; 3+ messages in thread
From: Kinglong Mee @ 2014-05-23  2:51 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Linux NFS Mailing List, kinglongmee

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-23  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).