Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 1996 06:20:04 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, terry@lambert.org
Cc:        current@FreeBSD.ORG, peter@spinner.DIALix.COM
Subject:   Re: DEVFS broken by last devsw_add_generic()/bdevvp() changes
Message-ID:  <199608012020.GAA09015@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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



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