HomeFreeBSD

geom_vfs: Pre-allocate event for g_vfs_destroy.

Description

geom_vfs: Pre-allocate event for g_vfs_destroy.

When an active g_vfs is orphaned due to an underlying disk going away
the destroy is deferred until the filesystem is unmounted in
g_vfs_done(). However, g_vfs_done() is invoked from a non-sleepable
context and cannot use M_WAITOK to allocate the event. Instead,
allocate the event in g_vfs_orphan() and save it in the softc to be
retrieved by the last call to g_vfs_done().

Reported by: Jithesh Arakkan @ Chelsio
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D31354

Details

Provenance
jhbAuthored on Jul 30 2021, 12:09 AM
Reviewer
imp
Differential Revision
D31354: geom_vfs: Pre-allocate event for g_vfs_destroy.
Parents
R10:5b5d78897c8b: Use a more specific type for geom_disk.d_event.
Branches
Unknown
Tags
Unknown