]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cam(4): Improve XPT_DEV_MATCH
authorAlexander Motin <mav@FreeBSD.org>
Tue, 5 Oct 2021 18:54:03 +0000 (14:54 -0400)
committerAlexander Motin <mav@FreeBSD.org>
Tue, 5 Oct 2021 18:54:03 +0000 (14:54 -0400)
commit8f9be1eed11c27c66386c3d72cd6c6aef597fa0d
treea91e9060ef4d8492ea56cfd9f40bf0d1d9c1e619
parent7835b2cb4a1ae57f403739a2f1076ec7188f18c9
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
sys/cam/cam_ccb.h
sys/cam/cam_compat.c
sys/cam/cam_compat.h
sys/cam/cam_xpt.c