From owner-freebsd-current Sun May 19 10: 2:29 2002 Delivered-To: freebsd-current@freebsd.org Received: from damnhippie.dyndns.org (12-253-177-2.client.attbi.com [12.253.177.2]) by hub.freebsd.org (Postfix) with ESMTP id 8B0CA37B405 for ; Sun, 19 May 2002 10:02:25 -0700 (PDT) Received: from [172.22.42.2] (peace.hippie.lan [172.22.42.2]) by damnhippie.dyndns.org (8.12.3/8.12.3) with ESMTP id g4JH2O6r030859; Sun, 19 May 2002 11:02:24 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) User-Agent: Microsoft Outlook Express Macintosh Edition - 5.01 (1630) Date: Sun, 19 May 2002 11:02:24 -0600 Subject: Re: df From: Ian To: Ian Dowse , Terry Lambert Cc: freebsd-current Message-ID: In-Reply-To: <200205190041.aa04845@salmon.maths.tcd.ie> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 05/18/02 17:41, Ian Dowse wrote: > In message <3CE6DFED.8604C72C@mindspring.com>, Terry Lambert writes: >> I think the reason for the "if" is to keep the df from hanging >> indefinitely, particularly when you give it an explicit list. > > No, I believe the "if (vfslist != NULL)" code was there to reduce > the maximum column widths to those necessary for an explicit list > of filesystems rather than using the maximum widths for all > filesystems. The regetmntinfo() call before the "if" has already > performed any operations that could hang indefinitely, so it makes > sense to unconditionally use these up-to-date results instead of > the potentially stale list from getmntinfo(..., MNT_NOWAIT). > > Ian > That exactly matches my understanding of the code, the test for vfslist != NULL was there only to prevent recalculating the field widths when they "couldn't have changed". Except it turns out they could have changed for other reasons than a non-null vfslist. Terry, the issue of hanging (WAIT versus NOWAIT) is controlled by the -n (nflag) option, and by whether you've specifically named filesystems on the command line (indicating you're willing to wait for those filesystems). The vfslist stuff is related to the -t option (filter the list down to filesystems of a given type). There's no relationship between the vfslist and waiting or not. -- Ian (the other one) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message