multiple issues with devstat_*(9)
Alexander Motin
mav at FreeBSD.org
Thu Apr 7 10:59:45 UTC 2011
Alexander Best wrote:
> On Fri Apr 1 11, John Baldwin wrote:
>> On Thursday, March 31, 2011 6:33:39 pm Alexander Best wrote:
>>> i think there are multiple issues with devstat. i found the following in
>>> devicestat.h:
...
>>> funny thing is i found the following in scsi_pass.c:
>>>
>>> softc->device_stats = devstat_new_entry("pass",
>>> periph->unit_number, 0,
>>> DEVSTAT_NO_BLOCKSIZE
>>> | (no_tags ? DEVSTAT_NO_ORDERED_TAGS : 0),
>>> softc->pd_type |
>>> DEVSTAT_TYPE_IF_SCSI |
>>> DEVSTAT_TYPE_PASS,
>>> DEVSTAT_PRIORITY_PASS);
>>>
>>> ...so pass* *should* show up under iostat -t scsi.
As I can see, this is a bug (or feature) of the libdevstat /
devstat_selectdevs(). If you specify any -t, then pass devices will be
reported only if you request "pass" specifically.
>> Hmm, pass devices for adaX should not be SCSI though, they should be ide I
>> think.
>
> i think the situation with ATA_CAM should be discussed further. still besides
> this issue there are many more with devstat(3).
>
> i'll try to track all the "devstat_new_entry()" occurrences and see if some
> issues can be fixed. maybe only the proper DEVSTAT_* args were forgotten.
Assuming that SCSI and IDE in -t option means transport type, and
assuming that we count everything except ATA and SATA as SCSI, I've made
following patch, that should fix issues from the CAM side:
http://people.freebsd.org/~mav/cam.devstat.patch
Any objections? Or SCSI/IDE there expected to mean command set?
--
Alexander Motin
More information about the freebsd-scsi
mailing list