From owner-freebsd-geom@FreeBSD.ORG Sun Apr 23 16:30:54 2006 Return-Path: X-Original-To: freebsd-geom@FreeBSD.org Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1294616A400 for ; Sun, 23 Apr 2006 16:30:54 +0000 (UTC) (envelope-from jylefort@FreeBSD.org) Received: from mirapoint2.brutele.be (mirapoint2.brutele.be [212.68.199.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D9CF43D45 for ; Sun, 23 Apr 2006 16:30:53 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from host-212-68-244-243.brutele.be (host-212-68-244-243.brutele.be [212.68.244.243]) by mirapoint2.brutele.be (MOS 3.7.3-GA) with ESMTP id DYR24828; Sun, 23 Apr 2006 18:30:50 +0200 (CEST) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id DC39C5530; Sun, 23 Apr 2006 18:30:49 +0200 (CEST) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id 9DCC0C0DA; Sun, 23 Apr 2006 18:30:49 +0200 (CEST) Date: Sun, 23 Apr 2006 18:30:49 +0200 From: Jean-Yves Lefort To: "Poul-Henning Kamp" Message-Id: <20060423183049.0e90ee1e.jylefort@FreeBSD.org> In-Reply-To: <889.1145808650@critter.freebsd.dk> References: <20060423175605.35a26523.jylefort@FreeBSD.org> <889.1145808650@critter.freebsd.dk> X-Mailer: Sylpheed running on FreeBSD Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Sun__23_Apr_2006_18_30_49_+0200_FQ_43J5mh1sDLPJD" X-Junkmail-Status: score=10/50, host=mirapoint2.brutele.be X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A090207.444BAA33.001A,ss=1,fgs=0, ip=212.68.244.243, so=2005-12-15 23:46:19, dmn=5.1.5/2006-02-08 Cc: freebsd-geom@FreeBSD.org Subject: Re: multiple of sector size I/O restriction X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Apr 2006 16:30:54 -0000 --Signature=_Sun__23_Apr_2006_18_30_49_+0200_FQ_43J5mh1sDLPJD Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 23 Apr 2006 18:10:50 +0200 "Poul-Henning Kamp" wrote: > In message <20060423175605.35a26523.jylefort@FreeBSD.org>, Jean-Yves Lefo= rt wri > tes: >=20 > >> >Which causes this: > >> > > >> > # dd if=3D3D/dev/ad1 of=3D3Dtest bs=3D3D512 count=3D3D1 > >> > 1+0 records in > >> > 1+0 records out > >> > 512 bytes transferred in 1.889527 secs (271 bytes/sec) > >> > > >> > # dd if=3D3D/dev/ad1 of=3D3Dtest bs=3D3D513 count=3D3D1 > >> > dd: /dev/ad1: Invalid argument > >> > 0+0 records in > >> > 0+0 records out > >> > 0 bytes transferred in 0.000254 secs (0 bytes/sec) > >> > > >> >Why this restriction? > >>=20 > >> That is how disks work. > > > >I should reformulate my question. > > > >I've found some linux code which reads from a raw cd device in > >non-multiples of the sector size; I imagine that this code works on > >linux. This leads me to think that it is possible to overcome the > >hardware limitation by software means. Am I right? >=20 > Yes, the linux kernel does not give access to the raw disks, you > always have to pass though their buffer cache. >=20 > FreeBSD does never give you access to the buffer cache but always > sends you directly to the disk. >=20 > The userland application will have to read an integral number of > sectors at their physical boundaries on FreeBSD. Do you think it would be feasible (from a performance and/or complexity standpoint) to add the necessary magic to GEOM so that the restriction is lifted? --=20 Jean-Yves Lefort jylefort@FreeBSD.org http://lefort.be.eu.org/ --Signature=_Sun__23_Apr_2006_18_30_49_+0200_FQ_43J5mh1sDLPJD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFES6u5yzD7UaO4AGoRAqNyAJ0YY3da1eOaqUYUgbzxq0GxRzHHNgCfdOUb 0ttSevgbfbCqufsLvet6low= =By/K -----END PGP SIGNATURE----- --Signature=_Sun__23_Apr_2006_18_30_49_+0200_FQ_43J5mh1sDLPJD--