[stgt] lld and backstore modularization

ronnie sahlberg ronniesahlberg at gmail.com
Wed Aug 7 04:00:17 CEST 2013


Take a look at this, it is a hack but builds a tgtlib containing most
of tgtd except tgtd.c (so the modules can link back to things in tgtd)
and builds the 4 main backends as shared objects.
Once tgtd starts up (you have to add /usr/lib/tgt to ldconfig so that
the linker/loader can find libtgt.so)
it will scan /usr/lib/tgt/backing-stores and dlopen and invoke all
bs_*.so it finds there.

This should allow just dropping different backends indepentently of
the main tgtd




On Tue, Aug 6, 2013 at 10:54 AM, ronnie sahlberg
<ronniesahlberg at gmail.com> wrote:
> Or maybe better is just have it try to dlopen every file it finds in
> /usr/lib/tgtd/backing-store/ automatically on startup.
>
> Since the bs_*.c files use a lot of other symbols from usr/*.c we
> probably need to turn most of tgtd into a shared library so that the
> bs_*.so modules can be dlopened and link to the symbol,s they need.
> One way of doing this is to change the build so that tgtd.c is the
> main program and everything else becomes a /usr/lib/tgt/libtgt.so
>
>
>
> On Tue, Aug 6, 2013 at 10:45 AM, Andy Grover <agrover at redhat.com> wrote:
>> On 08/05/2013 02:19 PM, ronnie sahlberg wrote:
>>>
>>> I think this would be very useful and good thing to have.
>>>
>>> I am willing to help work on doing this for the backing-stores (5 in
>>> Alexanders initial mail)
>>>
>>> Only thing I think should be added to Alexanders proposal for (5)
>>> would be something like this :
>>> * BS modules are stored in /usr/lib/tgtd/backing-store/
>>> * BS modules to load can also be specified on the tgtd command-line :
>>>   tgtd ... --bs-modules=bs_rdwr.so
>>
>>
>> Could this be implicit? If the --bstype is not already loaded, go try and
>> load bs_foo.so?
>>
>> Regards -- Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo
Type: application/octet-stream
Size: 18069 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20130806/f3afef4b/attachment-0003.obj>


More information about the stgt mailing list