Page MenuHomeFreeBSD

geom_vfs: Pre-allocate event for g_vfs_destroy.
ClosedPublic

Authored by jhb on Jul 29 2021, 11:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 8, 1:17 PM
Unknown Object (File)
Tue, Jun 30, 6:41 PM
Unknown Object (File)
Mon, Jun 29, 9:18 PM
Unknown Object (File)
Fri, Jun 26, 9:49 PM
Unknown Object (File)
Fri, Jun 26, 10:37 AM
Unknown Object (File)
Jun 18 2026, 9:30 PM
Unknown Object (File)
Jun 18 2026, 8:21 PM
Unknown Object (File)
May 26 2026, 3:28 PM
Subscribers
None

Details

Summary

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
Sponsored by: Chelsio Communications

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40748
Build 37637: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Jul 29 2021, 11:13 PM
jhb created this revision.

Looks good. I think this covers the different cases.

This revision is now accepted and ready to land.Jul 30 2021, 12:05 AM
This revision was automatically updated to reflect the committed changes.