HomeFreeBSD

bhyve: Add support for handling disk resize events to block_if.

Description

bhyve: Add support for handling disk resize events to block_if.

Allow clients of blockif to register a resize callback handler. When
a callback is registered, register an EVFILT_VNODE kevent watching the
backing store for a change in the file's attributes. If the size has
changed when the kevent fires, invoke the clients' callback.

Currently resize detection is limited to backing stores that support
EVFILT_VNODE kevents such as regular files.

Reviewed by: grehan, markj
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D30504

Details

Provenance
jhbAuthored on Jun 12 2021, 12:59 AM
Reviewer
grehan
Differential Revision
D30504: bhyve: Add support for handling disk resize events to block_if.
Parents
rG67d60dcce62c: bhyve: Add support for EVFILT_VNODE mevents.
Branches
Unknown
Tags
Unknown