[stgt] [PATCH] Make backends loadable modules

ronnie sahlberg ronniesahlberg at gmail.com
Thu Aug 29 02:26:17 CEST 2013


On Wed, Aug 28, 2013 at 2:34 AM, Boaz Harrosh <bharrosh at panasas.com> wrote:
> On 08/28/2013 07:59 AM, ronnie sahlberg wrote:
>> Ah, Thanks.
>>
>> I'll do a new patch.
>>
>> On Tue, Aug 27, 2013 at 3:56 PM, Andy Grover <agrover at redhat.com> wrote:
>>> On 08/20/2013 07:46 PM, Ronnie Sahlberg wrote:
>>>>
>>>> Tomo,
>>>>
>>>> Please find a second version of the patch to make the backing stores
>>>> into loadable modules so that distributors can ship core tgtd as one
>>>> package and individual backends as separate packages. This prevents
>>>> having just a single module for everyone which depends on and
>>>> requires a huge set of dependent packets.
>>>>
>>>> This is version 2 This version only changes bs.c into a shared
>>>> library that the backend modules can link with at runtimie instead of
>>>> as in the first patch changing all of tgtd into a shared library.
>>>>
>>>>
>>>> regards ronnie sahlberg
>>>
>>>
>>> Hi Ronnie,
>>>
>>> I think you may be able to avoid making bs.c into a shared library if you
>>> link tgtd with the -E linker option.
>>>
>
> Personally I prefer the .so option:
>
> For one I hate any double dependency, and specially an executable dependency.
> This is bad code design and a call for tons of problems. It is called the
> libraries hell. Each module should be self contained or only depend downwards
> on lower stack. library rules are exactly like package rules only depend
> downwards, and the complex dependency should be a tree never a graph ...
>
> Second with the bs.c as library it is clear and protected what are the API's
> the backends are to depend on and import, No crazy unexpected stuff from
> a loaded plugin.

That is a good point.
--
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