[Stgt-devel] vtl patch.
FUJITA Tomonori
fujita.tomonori
Wed Apr 11 13:18:37 CEST 2007
From: "Mark Harvey" <markh794 at gmail.com>
Subject: Re: [Stgt-devel] vtl patch.
Date: Wed, 11 Apr 2007 12:06:18 +1000
> On 4/11/07, FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> wrote:
> > From: "Mark Harvey" <markh794 at gmail.com>
> > Subject: [Stgt-devel] vtl patch.
> > Date: Thu, 5 Apr 2007 09:56:10 +1000
> >
> > > Apologies for this being an attachment. It is rather large to include
> > > inline (57k).
> > >
> > > Follow up to feedback from earlier postings, I have implemented the following:
> > >
> > >
> > > This patch includes the following changes.
> > >
> > > - Patch to tgtadm so multiple '--name, --value' arguments can be passed.
> >
> > Why do we need multiple arguments?
> >
> > I prefer to keep the current semantics:
> >
> > $ tgtadm --lld iscsi --mode logicalunit --op update --tid=1 --lun=0 \
> > -n VendorIdent -v QUANTUM
> > $ tgtadm --lld iscsi --mode logicalunit --op update --tid=1 --lun=0 \
> > -n ProductIdent -v SDLT600
> > $ tgtadm --lld iscsi --mode logicalunit --op update --tid=1 --lun=0 \
> > -n ProductRev -v 0001
> > $ tgtadm --lld iscsi --mode logicalunit --op update --tid=1 --lun=0 \
> > -n SerialNumber -v XYZZY10
> >
> > rather than:
> >
> > tgtadm --lld iscsi --mode logicalunit --op update --tid=1 --lun=0 \
> > -n VendorIdent -v QUANTUM \
> > -n ProductIdent -v SDLT600 \
> > -n ProductRev -v 0001 \
> > -n SerialNumber -v XYZZY10
> >
> >
> > The rest looks ok.
> >
>
> Thanks for the feedback.
>
> While setting the Vendor Ident etc can be easly acheived one field at
> a time, configuring the parameters for the SMC device requires
> multiple parameters at the same time.
>
>
> e.g.
> > (Reserve address space for storage slots)
> > --name=ElementType --value=[1|2|3]
> > --name=StartAddress --value=number
> > --name=Quanity --value=number
> > --name=Sides --value=[1|2] (Single/double sided)
>
> I need to get the element type, starting address and number of slots
> and if media is single/double sided (or at minimum, the element type
> and the element address - if configuring a slot per instance of
> tgtcmd)
I can't find "ElementType" in ssc3_config or smc_config. Will you
implement it later?
Do you need a configuration like 'only when X is true, Y is
necessary'? I think that you can still do that with the current
semantics, 'one field at a time'. You just need to check whether the
configuration is valid when a user tries to start a target. Though
with a 'multiple fields at a time' scheme, the checking would be
a bit easier.
I don't like '--name a --value b --name b --value c ...' because it
doesn't look like the standard (GNU) option way.
More information about the stgt
mailing list