Re: [PATCH v4 4/4] scsi: target: core: Add RTPI attribute for target port

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

 



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.




[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