Re: [PATCH] Make backends loadable modules

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

 



On Wed, Aug 28, 2013 at 2:34 AM, Boaz Harrosh <bharrosh@xxxxxxxxxxx> 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@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux