On Wed, Mar 06, 2002 at 12:12:44PM -0500, Zhihui Zhang wrote: > > > On Wed, 6 Mar 2002, Peter Edwards wrote: > > > Zhihui Zhang wrote: > > > > <snip> > > > > > ... I also do not read anything during the partial block write, > > > and I think the disk controller should not do that either. > > > > If you do a partial block write, surely at some point the block must be read > > in order to preserve that segment of data you are _not_ overwriting? > > First off, I am not writing through any file system. I access the raw > device directly. Secondly, the bytes written are always a multiple of 512 > bytes. If one sector is the I/O unit of a disk controller, why should it > read anything to prevent overwritten?
I think Peter was referring to the (more common IMHO) case when one sector was not quite the I/O unit of the disk controller, especially WRT caching. That is, the disk controller does not actually do a physical disk write for each and every sector, but only in larger blocks. G'luck, Peter -- Peter Pentchev [EMAIL PROTECTED] [EMAIL PROTECTED] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 .siht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI
msg32504/pgp00000.pgp
Description: PGP signature