DragonFly commits List (threaded) for 2006-12
DragonFly BSD
DragonFly commits List (threaded) for 2006-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: "Thomas E. Spanjaard" <tgen@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 10 Dec 2006 15:36:13 -0800 (PST)

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

DragonFly src repository

  Modified files:
    sys/dev/disk/nata    ata-all.h ata-queue.c 
  Log:
  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@les.ath.cx>
  Reviewed-by:		Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
  
  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


http://www.dragonflybsd.org/cvsweb/src/sys/dev/disk/nata/ata-all.h.diff?r1=1.3&r2=1.4&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/disk/nata/ata-queue.c.diff?r1=1.1&r2=1.2&f=u



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