Author: mav
Date: Thu Mar 5 13:52:30 2015
New Revision: 279657
URL: https://svnweb.freebsd.org/changeset/base/279657
Log:
Add check for absent stripe size to r279652.
MFC after: 2 weeks
Modified:
head/usr.sbin/bhyve/pci_virtio_block.c
Modified: head/usr.sbin/bhyve/pci_virtio_block.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_block.c Thu Mar 5 12:40:59 2015
(r279656)
+++ head/usr.sbin/bhyve/pci_virtio_block.c Thu Mar 5 13:52:30 2015
(r279657)
@@ -311,7 +311,7 @@ pci_vtblk_init(struct vmctx *ctx, struct
}
assert(size != 0);
assert(sectsz != 0);
- if (ioctl(fd, DIOCGSTRIPESIZE, &sts) == 0)
+ if (ioctl(fd, DIOCGSTRIPESIZE, &sts) == 0 && sts > 0)
ioctl(fd, DIOCGSTRIPEOFFSET, &sto);
} else
sts = sbuf.st_blksize;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"