SPC - Report Luns command

Binford, Charles cbinford at ppdpost.ks.symbios.com
Tue Dec 10 06:33:00 PST 1996


* From the SCSI Reflector (scsi at symbios.com), posted by:
* "Binford, Charles" <cbinford at ppdpost.ks.symbios.com>
*

To solve the problem of needing to know how big of buffer to allocate before 
issuing the Report LUNs command I would do the following:

 - Allocate a moderate size buffer which will cover the majority of cases. 
 Say 136 bytes (16 LUNs + 8 bytes header)
 - Issue the Report LUNs command and look at the LUN List Length in the 
parameter list returned by the device.
 - If  ((LUN_List_length + 8) <= Allocated_Length)
    done, use the data
  else
    free small buffer
    allocate new buffer with size (LUN_List_length+8)
    re-issue the Report LUNs command

Charles Binford
Symbios Logic

>---------------------------------------------------------------------------  
 ---
>* From the SCSI Reflector (scsi at symbios.com), posted by:
>* Larry Chen <larryc at maxstrat.com>
>*
>Would someone be interested in seeing this through :)
>
>It has been mentioned that the Report LUNs command
>can return any of the following via the 8 byte LUN
>addressing structure:
>
>- peripheral device
>- lun device
>- volume set device
>
>This is dandy but I would like a way to specify what
>is actually returned though.
>
>Specifically, I would like the freedom to ask for
>only the peripheral device LUNs or only the volume set
>device LUNs or both or neither (I guess).
>
>In device driver land, it is better to know in advance
>how much memory is needed before issuing the report
>LUNs command.
>
>----------------------------------------------------
>Larry Chen                 Tel: 408.383.1600 (x116)
>Maximum Strategy, Inc.     Fax: 408.383.1616
>801 Buckeye Court       E-mail: larryc at maxstrat.com
>Milpitas, CA 95035
>----------------------------------------------------
*
* For SCSI Reflector information, send a message with
* 'info scsi' (no quotes) in the message body to majordomo at symbios.com




More information about the T10 mailing list