NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38643: [dM] st tape drive loses data



On Mon, Sep 01, 2008 at 10:22:20PM +0200, Manuel Bouyer wrote:
 > > -  bp->b_resid = bp->b_bcount;
 > > +  bp->b_resid = 0;
 > >    biodone(bp);
 > >    return;
 > >  }
 > 
 > This is wrong; This code is used in error path (b_error is not 0), and
 > for the case (bp->b_bcount == 0). When b_error is not 0, bp->b_resid
 > has to be equal to bp->b_bcount or a KASSERT will be triggered later.
 > 
 > I think the code here does what's intended, but maybe the comment is
 > misleading.

Bah.

Yes, it does, but it's very unclear. I think I will go clarify it a
little.

I guess it was too much to hope it would be this simple...

(any thoughts on the bit from kern_physio?)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index