kernel/nataraid: Fix an issue with the devstat support I added recently.
authorSascha Wildner <saw@online.de>
Thu, 20 Feb 2014 22:22:27 +0000 (23:22 +0100)
committerSascha Wildner <saw@online.de>
Thu, 20 Feb 2014 22:22:27 +0000 (23:22 +0100)
This fixes the "devstat_end_transaction: HELP!! busy_count for ar0 is < 0"
we were seeing.

Tested-by: Aaron Bieber <deftly@gmail.com>
sys/dev/disk/nata/ata-raid.c

index d469d4d..f1b994b 100644 (file)
@@ -833,7 +833,6 @@ ata_raid_done(struct ata_request *request)
        kprintf("ar%d: unknown array type in ata_raid_done\n", rdp->lun);
     }
 
-    devstat_end_transaction_buf(&rdp->devstat, bbp);
     if (finished) {
        if ((rdp->status & AR_S_REBUILDING) && 
            rdp->rebuild_lba >= rdp->total_sectors) {
@@ -850,6 +849,7 @@ ata_raid_done(struct ata_request *request)
            rdp->status &= ~AR_S_REBUILDING;
            ata_raid_config_changed(rdp, 1);
        }
+       devstat_end_transaction_buf(&rdp->devstat, bbp);
        if (!bbp->b_resid)
            biodone(bp);
     }