Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Oct 1998 14:41:33 -0700 (PDT)
From:      Kenneth Merry <ken@FreeBSD.ORG>
To:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   cvs commit: src/sys/cam cam_periph.c cam_periph.h
Message-ID:  <199810132141.OAA27181@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
ken         1998/10/13 14:41:33 PDT

  Modified files:
    sys/cam              cam_periph.c cam_periph.h 
  Log:
  Fix a bug in the error recovery code.  It was possible to have more than
  one error recovery action oustanding for a given peripheral.
  
  This is bad for several reasons.  The first problem is that the error
  recovery actions would likely be to fix the same problem.  (e.g., we
  queue 5 CCBs to a disk, and the first one comes back with 0x04,0x02.  We
  start error recovery, and the second one comes back with the same status.
  Then the third one comes back, and so on.  Each one causes the drive to get
  nailed with a start unit, when we really only need one.)
  
  The other problem is that we only have space to store one CCB while we're
  doing error recovery.  The subsequent error recovery actions that got
  started were over-writing the CCBs from previous error recovery actions,
  but we still tried to call the done routine N times for N error recovery
  actions.  Each call to dadone() was done with the same CCB, though.  So on
  the second one, we got a "biodone: buffer not busy" panic, since the buffer
  in question had already been through biodone().
  
  In any case, this fixes things so that any any given time, there's only one
  error recovery action outstanding for any given peripheral driver.
  
  Reviewed by:	gibbs
  Reported by:	Philippe Regnauld <regnauld@deepo.prosa.dk>
  [ Philippe wins the "bug finder of the week" award ]
  
  Revision  Changes    Path
  1.4       +57 -1     src/sys/cam/cam_periph.c
  1.2       +2 -1      src/sys/cam/cam_periph.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



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