From owner-freebsd-hackers Wed Nov 3 12:18:17 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id ADAF515237 for ; Wed, 3 Nov 1999 12:18:11 -0800 (PST) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id PAA11451; Wed, 3 Nov 1999 15:13:45 -0500 (EST) (envelope-from luoqi) Date: Wed, 3 Nov 1999 15:13:45 -0500 (EST) From: Luoqi Chen Message-Id: <199911032013.PAA11451@lor.watermarkgroup.com> To: dillon@apollo.backplane.com, zzhang@cs.binghamton.edu Subject: Re: Granularity of disk I/O Cc: freebsd-hackers@FreeBSD.ORG, grog@lemis.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :Thanks. It seems to me that for a filesystem, a block (or a fragment) is > :the unit of I/O. Even if a single byte is modified, an entire block > :probably consisting of multiple sectors must be written back to the disk. > :As you said, there is no differnce whether we write this block one sector > :at a time or in a single transfer. If so, I wonder whether the atomicity > :of a sector I/O required by a directory file is necessary any more. > : > :-Zhihui > > 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. > I think atomicity is still the reason. The basic block size of a directory is still a 512-byte sector, and chances are we might write directory blocks one sector at a time (4k/512 formatted fs), so we have to guarantee directory entries don't cross the 512-byte sector boundary. On a 8k/1k fs, you probably could get away with crossing the odd 512-byte sector boundary though. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message