All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Bogdanov <d.bogdanov@yadro.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	<target-devel@vger.kernel.org>,
	Mike Christie <michael.christie@oracle.com>,
	<linux-scsi@vger.kernel.org>, <linux@yadro.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>
Subject: Re: [PATCH v2 4/5] scsi: target: core: Add common port attributes
Date: Wed, 19 Oct 2022 18:13:47 +0300	[thread overview]
Message-ID: <20221019151347.GG10901@yadro.com> (raw)
In-Reply-To: <Y00HWKHL3gj/An8E@infradead.org>

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@yadro.com>
> >
> > 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

  reply	other threads:[~2022-10-19 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 10:50 [PATCH v2 0/5] scsi: target: make RTPI an TPG identifier Dmitry Bogdanov
2022-10-06 10:50 ` [PATCH v2 1/5] scsi: target: core: Add RTPI field to target port Dmitry Bogdanov
2022-10-17  7:38   ` Christoph Hellwig
2022-10-19 14:21     ` Dmitry Bogdanov
2022-10-06 10:50 ` [PATCH v2 2/5] scsi: target: core: Use RTPI from " Dmitry Bogdanov
2022-10-17  7:39   ` Christoph Hellwig
2022-10-06 10:50 ` [PATCH v2 3/5] scsi: target: core: Drop device-based RTPI Dmitry Bogdanov
2022-10-17  7:39   ` Christoph Hellwig
2022-10-06 10:50 ` [PATCH v2 4/5] scsi: target: core: Add common port attributes Dmitry Bogdanov
2022-10-17  7:42   ` Christoph Hellwig
2022-10-19 15:13     ` Dmitry Bogdanov [this message]
2022-10-06 10:50 ` [PATCH v2 5/5] scsi: target: core: Add RTPI attribute for target port Dmitry Bogdanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221019151347.GG10901@yadro.com \
    --to=d.bogdanov@yadro.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=r.bolshakov@yadro.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.