target-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Bogdanov <d.bogdanov@yadro.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	<target-devel@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	<linux-scsi@vger.kernel.org>, <linux@yadro.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>
Subject: Re: [PATCH v4 4/4] scsi: target: core: Add RTPI attribute for target port
Date: Wed, 1 Mar 2023 11:32:24 +0300	[thread overview]
Message-ID: <20230301083224.GA1340@yadro.com> (raw)
In-Reply-To: <a72558e0-04b9-d641-0703-63d2d348ff6b@oracle.com>

On Wed, Feb 22, 2023 at 03:41:20PM -0600, Mike Christie wrote:
> 
> On 2/21/23 10:06 AM, Dmitry Bogdanov wrote:
> > +static ssize_t target_fabric_tpg_base_rtpi_show(struct config_item *item, char *page)
> > +{
> > +     struct se_portal_group *se_tpg = attrib_to_tpg(item);
> 
> ..
> 
> > +
> > +static ssize_t target_fabric_tpg_base_rtpi_store(struct config_item *item,
> > +                                const char *page, size_t count)
> > +{
> > +     struct se_portal_group *se_tpg = attrib_to_tpg(item);
> 
> 
> This interface is nicer. It doesn't work for me though. I think
> it's because attrib_to_tpg is returning a bogus pointer. The rtpi
> file is not in the attrib group so I think you have to use to_tpg().
> Or, put the rtpi file in the attrib group if that's preferred (it
> doesn't matter to me).

Yes, I should use to_tpg. Forgot to change it after moving to tpgt_n
folder. Read after write was working for me so I didn't suspect
something was wrong.


      reply	other threads:[~2023-03-01  8:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 16:06 [PATCH v4 0/5] scsi: target: make RTPI an TPG identifier Dmitry Bogdanov
2023-02-21 16:06 ` [PATCH v4 1/4] scsi: target: core: Add RTPI field to target port Dmitry Bogdanov
2023-02-21 16:06 ` [PATCH v4 2/4] scsi: target: core: Use RTPI from " Dmitry Bogdanov
2023-02-21 16:06 ` [PATCH v4 3/4] scsi: target: core: Drop device-based RTPI Dmitry Bogdanov
2023-02-21 16:06 ` [PATCH v4 4/4] scsi: target: core: Add RTPI attribute for target port Dmitry Bogdanov
2023-02-22 21:41   ` Mike Christie
2023-03-01  8:32     ` Dmitry Bogdanov [this message]

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=20230301083224.GA1340@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).