[Stgt-devel] Adding Virtial Tape & Changer targets
Douglas Gilbert
dougg
Wed Mar 21 04:41:43 CET 2007
Mark Harvey wrote:
> A quick introduction.
>
> I am planning on adding support to the stgt for both SSC and SMC
> devices with the aim of full Virtual Tape Library support.
>
> I have a working VTL based around the scsi_debug kernel module +
> char-device 'back-end' to pass SCSI commands thru to user-space
> daemons (which poll the char device looking for work to do). These
> daemons act as the SSC or SMC devices.
>
> This VTL I have had working for over 12mths.
>
> However there are some limitations (like a kernel module required for
> each OS port).
>
> I want to move this code base across to an iSCSI frame-work and have
> finally given up on the Intel iSCSI Reference code base.
>
> There are some aspects of the stgt code that I would like to modify to
> make this 'port' a little easier.
>
> There is a lack of a 'generic' pointer for any data structures used
> for each target.
> i.e. I would like to malloc() required storage space to keep MODE/LOG
> SENSE data per target.
Mark,
Do you need to implement MODE SELECT? It isn't in stgt
or any other command that has metadata to be parsed
in the data_out buffer.
As far as I can see that needs a "double parse". The
first time with the cdb alone so the parser can
work out the allocation length. That length is them
passed back to the transport which fetches a data_out
buffer of that size from the initiator. Then the
transport needs to revisit the parser, this time
with cdb+data_out.
Doug Gilbert
More information about the stgt
mailing list