Add check for absent stripe size to r279652.

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2015-03-05 13:52:30 +00:00
parent 94682383d9
commit d951589ddb

View File

@ -311,7 +311,7 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
}
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;