aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2001-09-02 23:16:40 +0000
committerScott Long <scottl@FreeBSD.org>2001-09-02 23:16:40 +0000
commit61fea3829341d3a0a468e2e0267e3fcd10d49cc1 (patch)
treecdda4be7b1a525e936c07a604ba7277168b2af33 /sys/dev
parent3361abb7a74f77b8874c92831523e7b2d02f4288 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aac_disk.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c
index 931be9d8864a..a5a70da2451c 100644
--- a/sys/dev/aac/aac_disk.c
+++ b/sys/dev/aac/aac_disk.c
@@ -294,10 +294,15 @@ aac_biodone(struct bio *bp)
devstat_end_transaction_bio(&sc->ad_stats, bp);
if (bp->bio_flags & BIO_ERROR) {
+ /*
+ * XXX For some reason, the disklabel seems to get zero'd out. This
+ * will cause diskerr to panic unless we pass in -1 as the blkno.
+ */
+ int blkno = (sc->ad_label.d_nsectors) ? 0 : -1;
#if __FreeBSD_version > 500005
- diskerr(bp, (char *)bp->bio_driver1, 0, &sc->ad_label);
+ diskerr(bp, (char *)bp->bio_driver1, blkno, &sc->ad_label);
#else
- diskerr(bp, (char *)bp->bio_driver1, 0, -1, &sc->ad_label);
+ diskerr(bp, (char *)bp->bio_driver1, 0, blkno, &sc->ad_label);
#endif
}
biodone(bp);