Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Mar 2002 19:24:18 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        Peter Edwards <peter.edwards@openet-telecom.com>, "Brian T.Schellenberger" <bts@babbleon.org>, Lars Eggert <larse@ISI.EDU>, "Rogier R. Mulhuijzen" <drwilco@drwilco.net>, Julian Elischer <julian@elischer.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: A weird disk behaviour
Message-ID:  <20020306192418.G14052@straylight.oblivion.bg>
In-Reply-To: <Pine.SOL.4.21.0203061209250.6633-100000@onyx>; from zzhang@cs.binghamton.edu on Wed, Mar 06, 2002 at 12:12:44PM -0500
References:  <3C8648F5.1EC1E4EE@openet-telecom.com> <Pine.SOL.4.21.0203061209250.6633-100000@onyx>

next in thread | previous in thread | raw e-mail | index | archive | help

--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
> > <snip>
> >=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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020306192418.G14052>