HomeFreeBSD

geom_slice: do not destroy softc until providers are gone

Description

geom_slice: do not destroy softc until providers are gone

At present, g_slice_orphan and g_slice_spoiled destroy the softc
(struct g_slicer) even before calling g_wither_geom, so there can
be active and incoming io requests at that time and g_slice_start
can access the softc.

This commit changes the code to destroy the softc only after all
providers are closed.

While there, a couple of small cleanups.

Reported by: Ben RUBSON <ben.rubson@gmail.com>
Tested by: Ben RUBSON <ben.rubson@gmail.com>
Reviewed by: mav, smh (earlier version)
MFC after: 2 weeks
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D12809

Details

Provenance
avgAuthored on Oct 31 2017, 10:10 AM
Parents
rG896b68b9361f: Add myself as a new committer
Branches
Unknown
Tags
Unknown

Event Timeline