[stgt] lld and backstore modularization

ronnie sahlberg ronniesahlberg at gmail.com
Wed Aug 7 04:03:43 CEST 2013

If this is the way to go,  anyone that is better at makefiles than I
want to help clean it up a bit ?

On Tue, Aug 6, 2013 at 7:00 PM, ronnie sahlberg
<ronniesahlberg at gmail.com> wrote:
> 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
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