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



The following reply was made to PR kern/38643; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
Cc: David Holland <dholland-bugs%NetBSD.org@localhost>, Havard Eidnes 
<he%NetBSD.org@localhost>,
        gnats-bugs%NetBSD.org@localhost, mouse%Rodents.Montreal.QC.CA@localhost,
        kern-bug-people%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost,
        netbsd-bugs%NetBSD.org@localhost, yamt%NetBSD.org@localhost
Subject: Re: kern/38643: [dM] st tape drive loses data
Date: Mon, 1 Sep 2008 21:59:40 +0000

 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