Page MenuHomeFreeBSD

cam(4): Improve XPT_DEV_MATCH
ClosedPublic

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

Details

Summary

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

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.
sys/cam/cam_ccb.h
472–473

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.