[stgt] setting write cache fails in recent git
Tomasz Chmielewski
mangoo at wpkg.org
Thu Oct 16 15:45:16 CEST 2008
Doron Shoham schrieb:
> Tomasz Chmielewski wrote:
>> Tomasz Chmielewski schrieb:
>>> Doron Shoham schrieb:
>>>
>>> (...)
>>>
>>>> I want to add bstype to the target show,
>>>> and to add additional option in the conf file of
>>>> tgt-admin("backing-store /dev/sdb <bstype>).
>>>> Does it sounds ok?
>>>> If so, Tomasz, can u please guide me how to add it to the tgt-admin?
>>> Could you give me an example tgtadm code which does this?
>> I meant syntax, like:
>>
>> tgtadm --some option --here bstype
>>
>>
>
> You will define in the conf file:
> backing-store /dev/sdb <bstype>
> bstype can be aio, mmap, null, rdwr or ssc.
I assume it would default to some value as well, if <bstype> is not present?
You would have to split $backing_store variable somewhere close to here:
sub add_backing_direct {
my $backing_store = $_[0];
Because a couple of lines farther we check if the device is in use.
For splitting, see "if ($option eq "outgoinguser") {".
Another option would be to configure it like below:
backing-store /dev/sdb
bstype rdwr
In this case, it has to be hooked in a similar way the lun detection is
done.
> and the equivalent tgtadm command will be something like:
> tgtadm -- tgtadm --lld $driver --op new --mode logicalunit --tid $next_tid --lun $lun -b $backing_store -E $bstype
>
> btw,
> what is the "device-type" config option?
# tgtadm --op show --mode target|grep Type
Type: controller
Type: disk
Other would be tape (not supported), cd, etc.
--
Tomasz Chmielewski
http://wpkg.org
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list