From owner-cvs-sys Thu May 1 13:27:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA14298 for cvs-sys-outgoing; Thu, 1 May 1997 13:27:07 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA14292; Thu, 1 May 1997 13:27:02 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id GAA24197; Fri, 2 May 1997 06:23:21 +1000 Date: Fri, 2 May 1997 06:23:21 +1000 From: Bruce Evans Message-Id: <199705012023.GAA24197@godzilla.zeta.org.au> To: cvs-all@freebsd.org, CVS-committers@freebsd.org, cvs-sys@freebsd.org, sos@freefall.FreeBSD.ORG Subject: Re: cvs commit: src/sys/scsi sd.c Sender: owner-cvs-sys@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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. 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.) Bruce