Re: [PATCH v2 4/5] scsi: target: core: Add common port attributes

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

 



On Mon, Oct 17, 2022 at 12:42:16AM -0700, Christoph Hellwig wrote:
> 
> On Thu, Oct 06, 2022 at 01:50:56PM +0300, Dmitry Bogdanov wrote:
> > From: Roman Bolshakov <r.bolshakov@xxxxxxxxx>
> >
> > All SCSI target port attributes (tpgN/attribs/attrname) are defined and
> > implemented in fabric modules in existing implementation.
> >
> > The change introduces a way to have common tpg attribs in configfs for
> > all fabrics without code duplication.
> 
> But does it really buy you much?  There is quite a lot of boilerplate
> code vs just adding an attribute to an array in the drivers, which could
> be further simplified by having a macro for all common ones.

Yes, of course. Mostly it is not about deduplication, but for just a
logical place of the attribute. Without this patch the 5th patch would
be cloned for every fabric driver. Moreover it would look strange to
have a some private core logic (check enableness) in fabric driver.

BR,
 Dmitry



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux