Re: lld and backstore modularization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxxx> 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

Attachment: foo
Description: Binary data


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux