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.