Re: Get "device is busy" when umounting nfsv4 file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx <mailto:kinglongmee@xxxxxxxxx>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux