From owner-freebsd-hackers Wed Mar 6 9:24:31 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from straylight.ringlet.net (discworld.nanolink.com [217.75.135.248]) by hub.freebsd.org (Postfix) with SMTP id B13DC37B41D for ; Wed, 6 Mar 2002 09:24:00 -0800 (PST) Received: (qmail 33437 invoked by uid 1000); 6 Mar 2002 17:24:18 -0000 Date: Wed, 6 Mar 2002 19:24:18 +0200 From: Peter Pentchev To: Zhihui Zhang Cc: Peter Edwards , "Brian T.Schellenberger" , Lars Eggert , "Rogier R. Mulhuijzen" , Julian Elischer , freebsd-hackers@FreeBSD.ORG Subject: Re: A weird disk behaviour Message-ID: <20020306192418.G14052@straylight.oblivion.bg> Mail-Followup-To: Zhihui Zhang , Peter Edwards , "Brian T.Schellenberger" , Lars Eggert , "Rogier R. Mulhuijzen" , Julian Elischer , freebsd-hackers@FreeBSD.ORG References: <3C8648F5.1EC1E4EE@openet-telecom.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="3xoW37o/FfUZJwQG" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from zzhang@cs.binghamton.edu on Wed, Mar 06, 2002 at 12:12:44PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --3xoW37o/FfUZJwQG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 06, 2002 at 12:12:44PM -0500, Zhihui Zhang wrote: >=20 >=20 > On Wed, 6 Mar 2002, Peter Edwards wrote: >=20 > > Zhihui Zhang wrote: > >=20 > > > >=20 > > > ... I also do not read anything during the partial block write, > > > and I think the disk controller should not do that either. > >=20 > > 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? >=20 > 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 --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 =2Esiht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI --3xoW37o/FfUZJwQG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjyGUMIACgkQ7Ri2jRYZRVMpvgCfetzSzLefMKrFMNMqWED630PU 2AIAn1dIfEazaUS8X57y3hd/R869gNTE =KZRh -----END PGP SIGNATURE----- --3xoW37o/FfUZJwQG-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message