Do not report stripe size if it is equal to sector size.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2015-04-18 19:37:37 +00:00
parent 4cae2db2a8
commit 18c5ed7145

View file

@ -710,7 +710,8 @@ vtblk_alloc_disk(struct vtblk_softc *sc, struct virtio_blk_config *blkcfg)
dp->d_fwheads = blkcfg->geometry.heads;
}
if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY)) {
if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY) &&
blkcfg->topology.physical_block_exp > 0) {
dp->d_stripesize = dp->d_sectorsize *
(1 << blkcfg->topology.physical_block_exp);
dp->d_stripeoffset = (dp->d_stripesize -