Date: Thu, 5 Mar 2015 13:52:31 +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: r279657 - head/usr.sbin/bhyve Message-ID: <201503051352.t25DqVTd064869@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503051352.t25DqVTd064869>