camcontrol devlist device name ordering
John
jwd at FreeBSD.org
Fri Aug 31 00:31:06 UTC 2012
Hi Folks,
I've been working on a small utility to map devices and enclosures
and generate a small report. Nothing special really.
However, I've run into a small parsing issue I thought I'd ask
about here.
When running "camcontrol devlist", the device names are not always
printed out the same. For instance:
<HP EG0600FBLSH HPD2> at scbus7 target 165 lun 0 (pass24,da21)
<HP EG0600FBLSH HPD2> at scbus7 target 166 lun 0 (pass25,da22)
<HP EG0600FBLSH HPD2> at scbus7 target 167 lun 0 (pass26,da23)
<HP EG0600FBLSH HPD2> at scbus7 target 168 lun 0 (pass27,da24)
<HP D2700 SAS AJ941A 0131> at scbus7 target 169 lun 0 (ses0,pass28) <---
<HP EG0600FBLSH HPD2> at scbus7 target 170 lun 0 (pass29,da25)
<HP EG0600FBLSH HPD2> at scbus7 target 171 lun 0 (pass30,da26)
<HP EG0600FBLSH HPD2> at scbus7 target 172 lun 0 (pass31,da27)
In the last column, the disk devices are pass device / disk device. For
the enclosure, it's enclosure device / pass device.
First I looked at camcontrol, but it is simply looping over the list
as presented. It is not responsible for the ordering. I then started
poking around in sys/cam/scsi/scsi_ses.c and I can see where the device
is allocated, but I'm not sure how the insertion ordering is controlled
for the pass & ses devices.
Does someone with a bit more knowledge of this area have an idea
where I should look?
Running 9.1-PRERELEASE Fri Aug 24. 2012
Thanks,
John
More information about the freebsd-scsi
mailing list