Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Nov 1999 08:30:13 +1100
From:      Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Granularity of disk I/O
Message-ID:  <99Nov5.082443est.40325@border.alcanet.com.au>

next in thread | raw e-mail | index | archive | help
On Wed, 3 Nov 1999 11:37:42 -0800 (PST), Matthew Dillon <dillon@apollo.backplane.com> wrote:
> The directory blocking is there for a different reason.  Atomicy does not
> have much to do with it though perhaps it did at some point in the past.

Hmmm...  /usr/include/ufs/ufs/dir.h states:
 * A directory consists of some number of blocks of DIRBLKSIZ
 * bytes, where DIRBLKSIZ is chosen such that it can be transferred
 * to disk in a single atomic operation (e.g. 512 bytes on most machines).

(Interestingly, DIRBLKSIZ is defined as DEV_BSIZE (== 512) in
<ufs/ufs/dir.h>, 1024 in <dirent.h> and 512 in <nfs/nfs.h>).

If atomicity is no longer a requirement, there would seem to be
advantages in changing the directory block size to match the FS block
size.  In particular, this would reduce the number of unusable
fragments at the end of directory blocks (particularly where large
filenames are used), and speed up (marginally) skipping empty blocks.

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Nov5.082443est.40325>