From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Olson Newsgroups: gmane.emacs.devel Subject: Re: Fixing dired hangs when NFS mount goes AWOL Date: Wed, 5 Oct 2011 15:34:53 -0700 Message-ID: References: <87mxdf3z8u.fsf@stupidchicken.com> <0jty7nnl1f.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1317854127 22739 80.91.229.12 (5 Oct 2011 22:35:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2011 22:35:27 +0000 (UTC) Cc: Chong Yidong , Emacs Development Discussions To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 06 00:35:21 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RBa3c-0001Wb-QH for ged-emacs-devel@m.gmane.org; Thu, 06 Oct 2011 00:35:21 +0200 Original-Received: from localhost ([::1]:45231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBa3c-00082A-CN for ged-emacs-devel@m.gmane.org; Wed, 05 Oct 2011 18:35:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBa3Z-000821-Hr for emacs-devel@gnu.org; Wed, 05 Oct 2011 18:35:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBa3Y-0006VT-HW for emacs-devel@gnu.org; Wed, 05 Oct 2011 18:35:17 -0400 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:50916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBa3W-0006V7-Ha; Wed, 05 Oct 2011 18:35:14 -0400 Original-Received: by eye13 with SMTP id 13so2434371eye.0 for ; Wed, 05 Oct 2011 15:35:13 -0700 (PDT) Original-Received: by 10.204.143.26 with SMTP id s26mr6876bku.181.1317854113185; Wed, 05 Oct 2011 15:35:13 -0700 (PDT) Original-Received: by 10.204.112.79 with HTTP; Wed, 5 Oct 2011 15:34:53 -0700 (PDT) X-Originating-IP: [216.103.134.130] In-Reply-To: <0jty7nnl1f.fsf@fencepost.gnu.org> X-Google-Sender-Auth: 9Ezqu6KfL7zdx4_3-hbGfxXJx-E X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.215.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144593 Archived-At: On Wed, Oct 5, 2011 at 3:14 PM, Glenn Morris wrote: > >>>> Would you consider adding "-l" to the list of default arguments for >>>> `directory-free-space-args'? =C2=A0This will fix an issue where attemp= ting >>>> to open dired buffers with ls-lisp enabled hangs due to an AWOL NFS >>>> mount. > > Could you explain what the issue actually is? > Normally even trying to ls a directory containing eg a link to a missing > NFS directory hangs. > > Are you saying that doing dired on a local directory that contains a > link to a missing NFS mount works, but hangs in calling df to calculate > the 'total used xxx available yyy' part? The issue is that regardless of what directory you're trying to view using dired, 'df' apparently still tries to stat *every* known filesystem, including remote filesystems, before limiting its output to just that of the filsystem for the given directory. =C2=A0Changing the df options by adding '-l' makes df only consider local filesystems, so that it never tries to stat an NFS filesystem. > What does ls-lisp have to do with it? The call order is: dired-insert-directory insert-directory (version in ls-lisp.el is used) get-free-disk-space -> calls 'df' > I can see how adding -l might help with a plain `df' call, but how can > it help `df DIR' if DIR is local? Apparently it's an issue in how df is implemented, in that it still attempts to stat all existing mounts before narrowing the listing by the directory param. Possibly to resolve symlinks and get a "truename"? --=20 Michael Olson=C2=A0 |=C2=A0 http://mwolson.org/