cvs commit: src/sys/dev/disk/nata ata-all.h ata-queue.c

Thomas E. Spanjaard tgen at
Sun Dec 10 15:42:23 PST 2006

tgen        2006/12/10 15:36:13 PST

DragonFly src repository

  Modified files:
    sys/dev/disk/nata    ata-all.h ata-queue.c 
  Fix a deadlock in the request completion code when the timeout timed out.
  The cause was not unlocking the done spinlock before calling ata_completed,
  resulting in ata_completed waiting forever because it needs to acquire the
  lock as well.
  The solution introduces a new request flag, ATA_R_COMPLETED to signal
  sleepers that a request has or has not been completed. In theory, we could
  just check the return value of msleep(), but this is quite elegant, and
  corecode convinced me ;).
  Reported-by:		YONETANI Tomokazu <qhwt+dfly at>
  Reviewed-by:		Simon 'corecode' Schubert <corecode at>
  Revision  Changes    Path
  1.4       +1 -0      src/sys/dev/disk/nata/ata-all.h
  1.2       +19 -12    src/sys/dev/disk/nata/ata-queue.c

More information about the Commits mailing list