Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Apr 2015 19:37:37 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281698 - head/sys/dev/virtio/block
Message-ID:  <201504181937.t3IJbbpx088910@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Apr 18 19:37:37 2015
New Revision: 281698
URL: https://svnweb.freebsd.org/changeset/base/281698

Log:
  Do not report stripe size if it is equal to sector size.
  
  MFC after:	1 week

Modified:
  head/sys/dev/virtio/block/virtio_blk.c

Modified: head/sys/dev/virtio/block/virtio_blk.c
==============================================================================
--- head/sys/dev/virtio/block/virtio_blk.c	Sat Apr 18 17:41:09 2015	(r281697)
+++ head/sys/dev/virtio/block/virtio_blk.c	Sat Apr 18 19:37:37 2015	(r281698)
@@ -710,7 +710,8 @@ vtblk_alloc_disk(struct vtblk_softc *sc,
 		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 -



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504181937.t3IJbbpx088910>