From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from relay.parallels.com ([195.214.232.42]:58424 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756385Ab1F1JOs (ORCPT ); Tue, 28 Jun 2011 05:14:48 -0400 Received: from msk-exch1.sw.swsoft.com ([10.30.1.231] helo=mail.sw.ru) by relay.parallels.com with esmtps (TLSv1:RC4-MD5:128) (Exim 4.74) (envelope-from ) id 1QbUNb-0004lW-12 for util-linux@vger.kernel.org; Tue, 28 Jun 2011 13:14:47 +0400 Message-ID: <4E099B86.1030802@parallels.com> Date: Tue, 28 Jun 2011 13:14:46 +0400 From: Konstantin Khlebnikov MIME-Version: 1.0 To: util-linux , Subject: Re: [BUG] umount does not work for disconected nfs mounts References: <4E098E3B.5060707@openvz.org> <20110628085724.GE22770@foxbat.suse.cz> In-Reply-To: <20110628085724.GE22770@foxbat.suse.cz> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Sender: util-linux-owner@vger.kernel.org List-ID: Petr Uzel wrote: > On Tue, Jun 28, 2011 at 12:18:03PM +0400, Konstantin Khlebnikov wrote: >> commit 33cee6675edecbd27c0628f8b7c74c7d88fc02b2 >> http://git.kernel.org/?p=utils/util-linux/util-linux-ng.git;a=commitdiff;h=33cee6675edecbd27c0628f8b7c74c7d88fc02b2;hp=fde25e6be6e00a0998eb58b4b9d0d0b9ad65dbfd >> "umount: allow unmounting loopdev specified by associated file" >> broke umounting (by mountpoint) for broken nfs mounts, >> because now umount always call stat() for target argument and umount hang inside nfs-rpc: >> >> [] rpc_wait_bit_killable+0x1f/0x40 >> [] __rpc_execute+0xe5/0x2f0 >> [] rpc_execute+0x3e/0x50 >> [] rpc_run_task+0x70/0x90 >> [] rpc_call_sync+0x3e/0x70 >> [] nfs3_rpc_wrapper.constprop.11+0x43/0x70 >> [] nfs3_proc_getattr+0x42/0x80 >> [] __nfs_revalidate_inode+0x95/0x1f0 >> [] nfs_revalidate_inode+0x31/0x60 >> [] nfs_getattr+0x5a/0x110 >> [] vfs_getattr+0x1a/0x30 >> [] vfs_fstatat+0x53/0x70 >> [] vfs_stat+0x16/0x20 >> [] sys_newstat+0x15/0x30 >> [] tracesys+0xd9/0xde >> [] 0xffffffffffffffff > > Shouldn't this be handled in the kernel? Or is stat() really > supposed to fail in such way with broken nfs? It depends on used mount options, IIRR in "soft" mode it by default fail with EIO after 3-6 minutes timeout, in "hard" mode syscalls never returns EIO. BTW linux support bindmounting for individual files, so argument can refer to regular file not only for loop device image. > >> >> so mount /mnt/nfs get stuck, umounting by device is still possible. > > We might first scan through mtab to check if umount arg is known > mountpoint and only if we fail, we would look for associated loopfile. Yes, it seems is the best solution > > Karel? > > > Petr > > -- > Petr Uzel > IRC: ptr_uzl @ freenode