From owner-cvs-sys Thu May 1 14:38:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA18814 for cvs-sys-outgoing; Thu, 1 May 1997 14:38:14 -0700 (PDT) Received: from ravenock.cybercity.dk (ravenock.cybercity.dk [195.8.129.33]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA18799; Thu, 1 May 1997 14:37:38 -0700 (PDT) Received: (from sos@localhost) by ravenock.cybercity.dk (8.8.5/8.7.3) id XAA00522; Thu, 1 May 1997 23:28:18 +0200 (MEST) From: Søren Schmidt Message-Id: <199705012128.XAA00522@ravenock.cybercity.dk> Subject: Re: cvs commit: src/sys/scsi sd.c In-Reply-To: <199705012023.GAA24197@godzilla.zeta.org.au> from Bruce Evans at "May 2, 97 06:23:21 am" To: bde@zeta.org.au (Bruce Evans) Date: Thu, 1 May 1997 23:28:18 +0200 (MEST) Cc: cvs-all@freebsd.org, CVS-committers@freebsd.org, cvs-sys@freebsd.org, sos@freefall.FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-cvs-sys@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In reply to Bruce Evans who wrote: > > Modified: sys/scsi sd.c > > Log: > > Remove old code in #if 0, leftovers from the days before != 512byte > > sector support. > > Please put it back. It shows more or less the correct way to do things, > which is to let dscheck() do all the checking for all disks. Well, the history is there in the cvs files, but I can lived with the bloat if need be, peter can you revert the commit ?? > The != 512byte sector support breaks at least EOF handling. (dscheck() > rewrites both bp-b_resid and bp->b_bcount for transfers that cross the > end of the partition, but the != 512byte sector support does extra work > to prevent the change to bp->b_bcount. I think it does this prevent > truncation giving a count that isn't a multiple of sec_blk_ratio. I think > the count is always a multiple except for misconfigured partitions. > Partition sizes currently need to be multiples of sec_blk_ratio to > prevent this. Partition sizes should really be in units of sectors.) Well, the world isn't perfect, and this solution (which by the way isn't my invention see the initial commits) does the trick for now, it lets me use my 1K sector disks without trouble. This needs some thinking to be done right, if at all possible. I know that the authors are looking further into it, but wanted a minimal impact solution to start with... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end ..