Page MenuHomeFreeBSD

Changes to allow camcontrol to use cached data more often
AbandonedPublic

Authored by imp on Jun 17 2019, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:57 PM
Unknown Object (File)
Nov 22 2023, 6:15 PM
Unknown Object (File)
Nov 15 2023, 6:40 PM
Unknown Object (File)
Nov 11 2023, 3:08 PM
Unknown Object (File)
Oct 31 2023, 11:12 PM
Unknown Object (File)
Oct 14 2023, 5:36 PM
Unknown Object (File)
Oct 10 2023, 2:08 PM
Unknown Object (File)
Sep 29 2023, 11:09 PM
Subscribers

Details

Reviewers
scottl
ken
mav
Summary

Go ahead and completely fix the ata_params before calling the veto function. This breaks nothing that uses it in the tree since ata_params is ignored in storvsc_ada_probe_veto which is the only in-tree consumer.

If we can get the ata ident info from XPT_GDEV_TYPE query, then grab it from there rather than asking the drive.

Use the cam_ed copy of ata_params rather than malloc and freeing memory for it. This reaches into internal bits of xpt a little, and I'll clean that up later.

Create ata_param_fixup

Create a common fixup routine to do the canonical fixup of the
ata_param fixup. Call it from both the ATA and the ATA over SCSI
paths.

Use ata_param_fixup instead of a custom copy here

Switch to using the cached ata_params to determine if we have ATA behind SCSI.

Try to print data from cached copies

ata identify doesn't need to ask the drive over and over for the same
data. Teach camcontrol to use this data, except with -j is specified to
disable getting the data from the kernel's cache.

Note: There's a bunch of different changes in this, but collapsed together for ease of review.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24906
Build 23636: arc lint + arc unit

Event Timeline

rpokala added inline comments.
sbin/camcontrol/camcontrol.c
134

Please, no negated flags! CAM_ARG_CACHE and !CAM_ARG_CACHE is *infinitely* less likely to be mis-understood.

sbin/camcontrol/camcontrol.c
134

No. I can't use CAM_ARG_CACHE. This is only set when we don't use the cache.
CAM_ARG_DONT_USE_CACHE is the best I can offer.

some bits committed, others done differently.