HomeFreeBSD

bhyveload: correctly query size of disks

Description

bhyveload: correctly query size of disks

On FreeBSD fstat(2) works fine for querying sizes of plain files,
but not so much for character devices.
So, use DIOCGMEDIASIZE to try to get the correct size for disks
and disk-like devices (e.g. zvols).

PR: 220186
Reviewed by: tsoome, grehan
MFC after: 1 week

Details

Provenance
avgAuthored on
Reviewer
tsoome
Parents
rS320194: Add missing lock destructor invocations to the LinuxKPI unload handler.
Branches
Unknown
Tags
Unknown