summaryrefslogtreecommitdiffstats
path: root/sys/dev/amr
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-10-22 20:55:15 +0000
committermsmith <msmith@FreeBSD.org>1999-10-22 20:55:15 +0000
commit1e1a86c642c05b04b68acddb82e4524ef9c582ee (patch)
tree4d97bb1ebae1734ba870eba437870c1f68d749ee /sys/dev/amr
parent3d0daca952a67f886c2b99bf749026ca12b3bd48 (diff)
downloadFreeBSD-src-1e1a86c642c05b04b68acddb82e4524ef9c582ee.zip
FreeBSD-src-1e1a86c642c05b04b68acddb82e4524ef9c582ee.tar.gz
Use the physical block number, not the logical block number, for I/O
operations. The latter only works where the partion begins at the bottom of the disk. Whoops. Submitted by: Chris Csanady <cc@137.org>
Diffstat (limited to 'sys/dev/amr')
-rw-r--r--sys/dev/amr/amr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index 257479b..ca83a13 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -863,16 +863,16 @@ amr_startio(struct amr_softc *sc)
driveno = amrd->amrd_drive - &sc->amr_drive[0];
blkcount = bp->b_bcount / AMR_BLKSIZE;
- if ((bp->b_blkno + blkcount) > sc->amr_drive[driveno].al_size)
+ if ((bp->b_pblkno + blkcount) > sc->amr_drive[driveno].al_size)
device_printf(sc->amr_dev, "I/O beyond end of unit (%u,%d > %u)\n",
- bp->b_blkno, blkcount, sc->amr_drive[driveno].al_size);
+ bp->b_pblkno, blkcount, sc->amr_drive[driveno].al_size);
/*
* Build the I/O command.
*/
ac->ac_mailbox.mb_command = cmd;
ac->ac_mailbox.mb_blkcount = blkcount;
- ac->ac_mailbox.mb_lba = bp->b_blkno;
+ ac->ac_mailbox.mb_lba = bp->b_pblkno;
ac->ac_mailbox.mb_physaddr = ac->ac_sgphys;
ac->ac_mailbox.mb_drive = driveno;
ac->ac_mailbox.mb_nsgelem = ac->ac_nsgent;
OpenPOWER on IntegriCloud