Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2017 15:05:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 220186] bhyveload zfs boot broken after zfs boot change
Message-ID:  <bug-220186-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220186

            Bug ID: 220186
           Summary: bhyveload zfs boot broken after zfs boot change
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: avg@FreeBSD.org

There was a recent change to the ZFS boot code that makes check all vdev la=
bels
for the vdev configuration data.  ZFS boot code now requires information ab=
out
the disk sizes and, as a side effect, it now rejects disks with a too small
size.

That change exposed a problem in bhyveload.  Specifically, it uses fstat(2)=
 to
check a size of a disk.  But that seems to work reliably only if the disk i=
s a
file.  If the disk is character device, then st_size is zero and the ZFS bo=
ot
code rejects such a "zero-sized" disk.

It seems that bhyveload, cb_diskioctl() to be precise, needs to check the t=
ype
of the disk and issue a real DIOCGMEDIASIZE ioctl if it's a character devic=
e.

The emulation of illumos fstat64() in sys/cddl/compat/opensolaris/sys/stat.h
seems to be the code that can be easily reused.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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