cvs commit: src/sys/dev/disk/nata ata-all.h ata-queue.c
Thomas E. Spanjaard
tgen at crater.dragonflybsd.org
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
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 at les.ath.cx>
Reviewed-by: Simon 'corecode' Schubert <corecode at 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
More information about the Commits
mailing list