Skip to content

Bug fix for scsi.d

March 14, 2007

Today, well last night, I learned that dtrace clause local variables (this->) unlike thread local variables (self->) are not initialised by default. This is all clearly stated in the documentation had I read it with more care. My thanks to Adam on the OpenSoalris zfs-discuss alias for pointing it out to me. The long and the short of this means that when I changed scsi.d to use clause local variables I needed to also ensure that they were initialised before testing them.

While I was editing it I also added support for Group 6 and 7 SCSI commands. Since these commands are vendor specific it just prints out the first 32 bytes of the CDB, or the whole CDB if it is less than 32 bytes. In the event that you need more than 32 bytes to be printed adding this is trivial. The section of code, with line numbers, that prints out bytes 25 to 32 is listed here:

   554  PRINT_CDB(24)    555  PRINT_CDB(25)    556  PRINT_CDB(26)    557  PRINT_CDB(27)    558  PRINT_CDB(28)    559  PRINT_CDB(29)    560  PRINT_CDB(30)    561  PRINT_CDB(31) 

There are no prizes for working out how to make it print byte 33.

So there is verson 1.11 of scsi.d.

Tags: topic:[dtrace] topic:[scsi] topic:[scsi.d] topic:[solaris] topic:[opensolaris]


From → Solaris

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: