HomeFreeBSD

cam(4): Improve XPT_DEV_MATCH

Description

cam(4): Improve XPT_DEV_MATCH

Remove *_MATCH_NONE enums, making no sense and so never used. Make
*_MATCH_ANY enums 0 (no any match flags set), previously used by
*_MATCH_NONE. Bump CAM_VERSION to 0x1a reflecting those changes and
add compat shims.

When traversing through buses and devices do not descend if we can
already see that requested pattern does not match the bus or device.
It allows to save significant amount of time on system with thousands
of disks when doing limited searches.

Reviewed by: imp
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D32304

Details

Provenance
mavAuthored on Oct 5 2021, 6:54 PM
Reviewer
imp
Differential Revision
D32304: cam(4): Improve XPT_DEV_MATCH
Parents
rG7835b2cb4a1a: sbuf(9): Microoptimize sbuf_put_byte()
Branches
Unknown
Tags
Unknown