Page MenuHomeFreeBSD

cam(4): Improve XPT_DEV_MATCH

Authored by mav on Oct 5 2021, 2:13 AM.



Remove *_MATCH_NONE enums, making no sense so and 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.

Diff Detail

R10 FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mav requested review of this revision.Oct 5 2021, 2:13 AM
mav created this revision.
imp added inline comments.

I'd leave the trailing , here and elsewhere.

This revision is now accepted and ready to land.Oct 5 2021, 3:09 AM

Restore commas, fix compat shims.

This revision now requires review to proceed.Oct 5 2021, 4:00 PM
This revision was not accepted when it landed; it landed in state Needs Review.Oct 5 2021, 7:04 PM
This revision was automatically updated to reflect the committed changes.