[Stgt-devel] [Patch 0/2] Re-format / resubmit patch - try 3.

Mark Harvey markh794
Fri Jun 1 02:28:28 CEST 2007


Apologies if this is a duplicate... gmail hick-up and I'm not actually
sure the first one was sent.

This is a re-submit of a previously rejected patch set.
I've corrected formatting style to suit.

This email includes both patches as attachments - I'll inline the two
patches in following email.

Unfortunately, I have yet to figure out how to inline patches thru
gmail and keep <tab> chars.


Patch 1 : Add new module entry points for configuration

Add new module entry points.
  <module>_lu_init(struct scsi_lu *lu) - called at setup time.
  <module>_lu_exit(struct scsi_lu *lu) - called at shutdown time.
  <module>_lu_config(struct scsi_lu *lu) - Any module unique configuration.

Moved logical unit configuration from target -> <module>
  Along with above entry point <module>_lu_config(), will allow module
  specific configuration.
  No new functionality added yet.

Add a dump_cdb(struct scsi_cmd *cmd) - Called from spc_illegal_op()

Update - All modules use common INQUIRY routine.



Patch 2 : Add ability to dynamically set SCSI Inquiry params

Added support to configure:
  Vendor Identification
  Product Identification
  Product Revision
  Format of returned 'sense data'
  Define if the lu is capable of supporting removable media
  Define/set if the lu is online / offline.
  Params are passed using the 'tgtadm' utility:

  VendorIdent="string"
  ProductIdent="string"
  ProductRev="string"
  Removable=<0|1> - 0 == non-removable, 1 == removable media
  SenseFormat=<0|1> - 0 == Clasic sense format, 1 == New sense format
  Online=<0|1> - 0 == Unit offline, 1 == Unit Online

e.g.
tgtadm --lld iscsi --mode logicalunit --op update --tid $TID --lun $LUN \
        --params VendorIdent=QUANTUM,ProductIdent=HD100,ProductRev=0010
tgtadm --lld iscsi --mode logicalunit --op update --tid $TID --lun $LUN \
        --params Removable=1,SenseFormat=1,Online=1

Example script (scripts/tgt-core-test) to set up HDD & CD device.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-new-module-entry-points-for-configuration.patch
Type: text/x-patch
Size: 22153 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/stgt-devel/attachments/20070601/515d9afd/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-ability-to-dynamically-set-SCSI-Inquiry-params.patch
Type: text/x-patch
Size: 5724 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/stgt-devel/attachments/20070601/515d9afd/attachment-0003.bin 



More information about the stgt mailing list