Re: [PATCH] Make backends loadable modules

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

 



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.

Please keep the second version as you sent it it is a much better style
than the -E hack.

Also in porting to other platforms the executable exporting symbols is
not available on all platforms.

Thanks, just me $0.017
Boaz

>> I've attached a patch that Fedora tgt carried for a little while that
>> modularized iser. I think my approach to iser modularization was bad and it
>> got dropped, but you could loot it for some Makefile magic :)
>>
>> Regards -- Andy
> --
> 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
> 

--
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