HomeFreeBSD

kern: osd: stop downsizing arrays when the last slot deregisters

Description

kern: osd: stop downsizing arrays when the last slot deregisters

It was noted in D41404 that these reallocations aren't actually
guaranteed to succeed, despite assertions to the contrary. We're
talking relatively small allocations, so just free up the individual
slot to be reused later as needed.

Note that this doesn't track the last active slot as of this moment, but
this could be done later if we find it's worth the complexity for what
little that would allow to be optimized (osd_call, slightly).

While we're here, fix the debug message that indicates which slot we
just allocated when we find an unused one; the slot # is actually one
higher than the index.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D41409

Details

Provenance
kevansAuthored on Aug 18 2023, 4:05 AM
Reviewer
markj
Differential Revision
D41409: kern: osd: stop downsizing arrays when the last slot deregisters
Parents
rG214e3e09b338: fwget: fix installing multiple firmware files
Branches
Unknown
Tags
Unknown