From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11788 invoked by alias); 17 Sep 2003 12:00:45 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 11772 invoked from network); 17 Sep 2003 12:00:44 -0000 Received: from unknown (HELO elf.meyering.net) (62.212.115.149) by sources.redhat.com with SMTP; 17 Sep 2003 12:00:44 -0000 Received: by elf.meyering.net (Acme Bit-Twister, from userid 1002) id 39AE83F8B; Wed, 17 Sep 2003 14:00:43 +0200 (CEST) To: Ulrich Drepper Cc: libc-hacker@sources.redhat.com, Aharon Robbins Subject: Re: statvfs suggestion In-Reply-To: <3F67AFD9.5010007@redhat.com> (Ulrich Drepper's message of "Tue, 16 Sep 2003 17:50:33 -0700") References: <200309021423.h82ENWrV018980@skeeve.com> <85isobj8b5.fsf@pi.meyering.net> <85smmx5ccp.fsf_-_@pi.meyering.net> <3F67AFD9.5010007@redhat.com> From: Jim Meyering Date: Wed, 17 Sep 2003 12:00:00 -0000 Message-ID: <851xuf1v6c.fsf@pi.meyering.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-09/txt/msg00066.txt.bz2 Ulrich Drepper wrote: > Jim Meyering wrote: >> What do you think about changing internal_statvfs.c so that it first >> reads/saves all entries from /proc/mounts without stat'ing each >> corresponding directory? Then it can stop if any mount point matches >> the name of the file. > > This really is no solution. The name passed to statvfs need not be the > actual mount point. And what about fstatvfs where we don't have a name? > > I added some code which cuts down on the number of stats by comparing > another value we know must match: the filesystem name. > > While doing this, though, I found that adding additional tests for the > name comparison isn't any more work so I added this as well. It's no > solution, but it might help in one situation or another. The result is > in CVS. Thanks for doing that. IMHO any change that converts an O(N^2) process into an O(N) one is more than a partial solution :-)