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

(cherry picked from commit 8f9be1eed11c27c66386c3d72cd6c6aef597fa0d)

Details

Provenance
mavAuthored on Oct 5 2021, 6:54 PM
Reviewer
imp
Differential Revision
D32304: cam(4): Improve XPT_DEV_MATCH
Parents
rG3ee882bf21af: Change lowest address on subnet (host 0) not to broadcast by default.
Branches
Unknown
Tags
Unknown