From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 23:32:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4515116A4CF for ; Mon, 21 Jun 2004 23:32:09 +0000 (GMT) Received: from VARK.homeunix.com (c-67-174-240-84.client.comcast.net [67.174.240.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id F21E943D48 for ; Mon, 21 Jun 2004 23:32:08 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i5LNVvcF001129; Mon, 21 Jun 2004 16:31:58 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i5LNVvVB001128; Mon, 21 Jun 2004 16:31:57 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Mon, 21 Jun 2004 16:31:57 -0700 From: David Schultz To: David Malone Message-ID: <20040621233157.GA1072@VARK.homeunix.com> Mail-Followup-To: David Malone , Scott Mitchell , freebsd-hackers@FreeBSD.ORG, Dimitry Andric References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406210910.aa18808@salmon.maths.tcd.ie> cc: freebsd-hackers@FreeBSD.ORG cc: Dimitry Andric cc: Scott Mitchell Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 23:32:09 -0000 On Mon, Jun 21, 2004, David Malone wrote: > > Sorting on nanoseconds too is likely to be more confusing than > > useful. Even if we use one of the precious few option letters ls > > doesn't use already to add a nanosecond display, most people won't > > know about it because they don't care about nanoseconds. They > > might care when they notice---as you did---that the sort order > > isn't what they expected. > > At the moment in FreeBSD the nanoseconds field is always zero, > unless you twiddle vfs.timestamp_precision, so it would make no > difference to joe user. For people that do set vfs.timestamp_precision, > it would be nice if ls did the right thing (for example, test already > compares the nanoseconds field, after someone submitted a PR because > it didn't). > > > Is the point of sorting on nanoseconds to totally order the files > > based on modification time? > > Depending on the clock resolution (which is partially determined > by vfs.timestamp_precision and partially determined by the actual > clock resolution), it may not be enough to totally order the files. Yep, that was going to be my next point. I don't think this is particularly useful, or necessarily even a good idea, but AFAIK POSIX doesn't say anything about using a consistent timer resolution when processing file timestamps, so don't let that stop you... Now let's re-raise the *original* bikeshed of adding nanosecond support to sleep!