From owner-cvs-src@FreeBSD.ORG Thu Nov 10 10:12:10 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B077416A420; Thu, 10 Nov 2005 10:12:10 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11EC443D45; Thu, 10 Nov 2005 10:12:09 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jAAAC8JS016016; Thu, 10 Nov 2005 21:12:08 +1100 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id jAAAC5Ir010287; Thu, 10 Nov 2005 21:12:07 +1100 Date: Thu, 10 Nov 2005 21:12:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Poul-Henning Kamp In-Reply-To: <3776.1131609828@critter.freebsd.dk> Message-ID: <20051110202946.Q2041@epsplex.bde.org> References: <3776.1131609828@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Doug White , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Doug White , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_subr.c src/sys/fs/devfs devfs_vnops.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2005 10:12:10 -0000 On Thu, 10 Nov 2005, Poul-Henning Kamp wrote: > In message <20051110184723.X71304@delplex.bde.org>, Bruce Evans writes: >> On Thu, 10 Nov 2005, Poul-Henning Kamp wrote: >> >>> I don't think I've seen any other proposals than to put it in >>> dirent where it rightfully belongs. >>> >>> The reason it is not in dirent is that UFS/FFS uses dirent as the >>> layout in directories as a microoptimization. >> >> I think the reason is exactly the opposite. > > Care to elaborate ? I think ffs is older than the current `struct dirent', and the latter was copied from ffs's `struct direct', not vice versa. This is true according to history in man pages and sources, but the history is very incomplete (see dir(5) (there is still no proper dirent(any), only a link to dir(5)), getdirentries(2), fs(5), ffs(7), , and ). Even if ffs is newer, it wouldn't be an optimization or otherwise useful to copy a userland directory format for the disk directory format. It's a micro-optimization for ffs to copy raw directory entries to userland. This is possible because the userland format is the same as the raw format. The userland format can't be changed easiy since just changing it would break compatibility. Compatibility is apparently especially important for dirents since we still have which was deprecated 15 years ago :-). Bruce