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

(cherry picked from commit 8794846a91c5429c612ba939c61ebf8f1ff1a628)

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
rGd7e2c1479ccf: bhyve: Add support for EVFILT_VNODE mevents.
Branches
Unknown
Tags
Unknown