From owner-freebsd-current Thu Aug 1 13:21:40 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA08291 for current-outgoing; Thu, 1 Aug 1996 13:21:40 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA08247 for ; Thu, 1 Aug 1996 13:21:36 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id GAA09015; Fri, 2 Aug 1996 06:20:04 +1000 Date: Fri, 2 Aug 1996 06:20:04 +1000 From: Bruce Evans Message-Id: <199608012020.GAA09015@godzilla.zeta.org.au> To: bde@zeta.org.au, terry@lambert.org Subject: Re: DEVFS broken by last devsw_add_generic()/bdevvp() changes Cc: current@FreeBSD.ORG, peter@spinner.DIALix.COM Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> Actually, they all "goto done;" and this is correct. dscheck() sets >> the error flag if necessary. There is no error for EOF. >My problem with od and sd are that they silently fail. I don't disagree >that they should be allowed to fail, only that they do so silently. >There seems to be a possible cascade failure for residuals in excess of >the block size from a silent failure... maybe I'm reading things wrong? You probably have the bug back to front. The residual needs to be set if dscheck() returns an error (not if dscheck() returns EOF). sd and od set it correctly but wd doesn't set it at all. Not setting it has bad effects in at least physio() - a wrong b_resid gives a wrong uio_resid. It should probably be set in dscheck(). We no longer use the stupid b_cylin[der] alias for b_resid (it is set but not used) so dscheck() could set b_resid = b_bcount in all cases. Bruce