kernel - Fix another AHCI bug
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 23 Mar 2012 08:47:48 +0000 (01:47 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 29 Mar 2012 23:06:23 +0000 (16:06 -0700)
commit7e6c59b8a3ec917894cf3256b092e3f7dcc2891b
treefad3a65d3871334d3b914d6ae9992a38b9b9041a
parent412f07cde12df9416f3ce8f67b832d9d382375c4
kernel - Fix another AHCI bug

* Remove the unlock/lock sequences around the xpt_done() calls.  These
  temporary unlocks create a gap which can allow another interrupt to
  squeeze in and interfere with the interrupt thread that is already
  running, resulting in corruption.

  This bug occurs under very heavy loads, and typically required multiple
  concurrent ops to a SSD to trigger.

* Add additional assertions to catch issues and reorder one of the
  chiploads.

* This is a bit non-optimal, be on the lookout for deadlocks in case it
  turns out that holding the lock is a bad idea.
sys/dev/disk/ahci/ahci.c
sys/dev/disk/ahci/ahci_cam.c
sys/dev/disk/ahci/ahci_dragonfly.c