git: 8794846a91c5 - main - bhyve: Add support for handling disk resize events to block_if.

John Baldwin jhb at FreeBSD.org
Mon Jun 14 15:55:01 UTC 2021


On 6/11/21 6:00 PM, John Baldwin wrote:
> The branch main has been updated by jhb:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=8794846a91c5429c612ba939c61ebf8f1ff1a628
> 
> commit 8794846a91c5429c612ba939c61ebf8f1ff1a628
> Author:     John Baldwin <jhb at FreeBSD.org>
> AuthorDate: 2021-06-12 00:59:25 +0000
> Commit:     John Baldwin <jhb at FreeBSD.org>
> CommitDate: 2021-06-12 01:00:24 +0000
> 
>      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.

Notably, this doesn't currently work for ZVOLs.  Adding support for
NOTE_ATTR events for ZVOLs when they resize is all that is needed for
this to work woith ZVOLs.

-- 
John Baldwin


More information about the dev-commits-src-all mailing list