Page MenuHomeFreeBSD

Changes to allow camcontrol to use cached data more often

Authored by imp on Jun 17 2019, 8:32 PM.



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

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 OK
No Unit Test Coverage
Build Status
Buildable 24906
Build 23636: arc lint + arc unit

Event Timeline

imp created this revision.Jun 17 2019, 8:32 PM
rpokala added inline comments.

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

imp added inline comments.Jun 17 2019, 8:59 PM

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.

imp abandoned this revision.Jul 19 2019, 6:12 PM

some bits committed, others done differently.