Correctly compute the block count. In reality, it seems that the
controller will never return the command if it's not exactly a multiple of a block in size. Cosmetic formatting for RAID level output.
This commit is contained in:
parent
83f2409369
commit
97adfbaf83
@ -1626,7 +1626,7 @@ mlx_startio(struct mlx_softc *sc)
|
||||
/* build a suitable I/O command (assumes 512-byte rounded transfers) */
|
||||
mlxd = (struct mlxd_softc *)bp->b_dev->si_drv1;
|
||||
driveno = mlxd->mlxd_drive - &sc->mlx_sysdrive[0];
|
||||
blkcount = bp->b_bcount / MLX_BLKSIZE;
|
||||
blkcount = (bp->b_bcount + MLX_BLKSIZE - 1) / MLX_BLKSIZE;
|
||||
|
||||
if ((bp->b_pblkno + blkcount) > sc->mlx_sysdrive[driveno].ms_size)
|
||||
device_printf(sc->mlx_dev, "I/O beyond end of unit (%u,%d > %u)\n",
|
||||
|
@ -267,7 +267,7 @@ mlxd_attach(device_t dev)
|
||||
state = "unknown state";
|
||||
}
|
||||
|
||||
device_printf(dev, "%uMB (%u sectors), RAID %d (%s)\n",
|
||||
device_printf(dev, "%uMB (%u sectors) RAID %d (%s)\n",
|
||||
sc->mlxd_drive->ms_size / ((1024 * 1024) / MLX_BLKSIZE),
|
||||
sc->mlxd_drive->ms_size, sc->mlxd_drive->ms_raidlevel, state);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user