Date: Wed, 3 Nov 1999 15:13:45 -0500 (EST) From: Luoqi Chen <luoqi@watermarkgroup.com> To: dillon@apollo.backplane.com, zzhang@cs.binghamton.edu Cc: freebsd-hackers@FreeBSD.ORG, grog@lemis.com Subject: Re: Granularity of disk I/O Message-ID: <199911032013.PAA11451@lor.watermarkgroup.com>
next in thread | raw e-mail | index | archive | help
> :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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911032013.PAA11451>