From owner-freebsd-fs@FreeBSD.ORG Tue Sep 18 15:28:51 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FD1F16A417 for ; Tue, 18 Sep 2007 15:28:51 +0000 (UTC) (envelope-from astrodog@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.238]) by mx1.freebsd.org (Postfix) with ESMTP id 125D213C47E for ; Tue, 18 Sep 2007 15:28:50 +0000 (UTC) (envelope-from astrodog@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so1022481nzf for ; Tue, 18 Sep 2007 08:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=kfeitG6T3aV+11kqDB8vy5AarvqhCPiVeOPRCbTnACs=; b=ewC/HftGeP+m1T0fz0B2roJSoJ+dfuKWLOtixiBR9J6vUlE3O4ts56Gq2uDy+OWRW+Cy79k4Ors6XFmcYc7zxDrkR5MYHp0ftT6Iw3r9PxllOT80pteTLYOhONTLNIe0qPMbATj3vhJjPeRDRFh8T54i4ec1N5IrZIeY5aZC83M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BONURClYb42GQ6Q1tGlLMjLjChUAEX336PBS3f0nMyL/owvbVVKr2KDaaL5P4JMk9NhAqPmMENBPdO+1tfAZxQF8jQRzTDnQIyBGOkOqVOn2xHSDtm2vhesYZf6FBSTPx1MaWJfXLRhyECqlMRF2PhAFkxbQchZft5ct0GK125Y= Received: by 10.115.60.1 with SMTP id n1mr1248187wak.1190129330030; Tue, 18 Sep 2007 08:28:50 -0700 (PDT) Received: by 10.141.74.5 with HTTP; Tue, 18 Sep 2007 08:28:49 -0700 (PDT) Message-ID: <2fd864e0709180828sec17035m5e575b5ad9701b08@mail.gmail.com> Date: Tue, 18 Sep 2007 10:28:49 -0500 From: Astrodog To: "Bruce Evans" In-Reply-To: <2fd864e0709180815y4c261252tfe9ce5c5a7130462@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200709180037.l8I0bJb1003933@freefall.freebsd.org> <20070918211449.A75529@besplex.bde.org> <2fd864e0709180453l756d37c6y7dac8fa5fa8fcf15@mail.gmail.com> <2fd864e0709180514w627bb198r46f4ddecb212fd77@mail.gmail.com> <20070918224545.Y75789@besplex.bde.org> <2fd864e0709180815y4c261252tfe9ce5c5a7130462@mail.gmail.com> Cc: freebsd-fs@freebsd.org, linimon@freebsd.org Subject: Re: amd64/74811: [nfs] df, nfs mount, negative Avail -> 32/64-bit confusion X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 15:28:51 -0000 On 9/18/07, Astrodog wrote: > > I cannot see how to get the correct result non-accidentally without > > using the hack of passing negative values as large unsigned ones. > > Passing negative values as the difference of two unsigned values works > > with NetBSD's extension to statvfs (f_bresvd), but it doesn't work for > > nfs because it requires an extra value which the protocol doesn't > > support AFAIK (not far). > > > > Bruce > > > > From the above, it doesn't appear that NFS can support negative > values, in any reasonable way... and I suppose that saying "There are > zero blocks avalible for non-privileged users" is accurate, when > bavail <= 0. > > I'm going to dig through the RFCs and see if there's an otherwise > unused or underused variable that could be used to store bresvd, for > clients that could support it. > > Thanks for the detailed explaination, > --- Harrison > The only thing I've found, thus far, is to hijack the "NULL" NFSv3 operation. From what I can tell, clients are expected to discard the value. On clients that are supported, the returned value can be what should be subtracted from bfree to get bavail. bavail can be handled as it is now in the server, so non-supporting clients wouldn't see any change in behavior, beyond a NULL nfs operation taking a few cycles longer. Any thoughts? I'm aware that this certainly isn't proper behavior... but I also can't find anything that actually uses the NULL return. --- Harrison