All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Christie <michael.christie@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Hannes Reinecke <hare@suse.de>,
	Bodo Stroesser <bstroesser@ts.fujitsu.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [RFC PATCH 00/10] target: add configfs interface
Date: Fri, 03 Jul 2020 22:12:26 +0000	[thread overview]
Message-ID: <16CCC5B0-A73C-44D3-A413-DBFE23989D26@oracle.com> (raw)
In-Reply-To: <0b59d643-61bf-6876-cc42-83ee8040da10@acm.org>



> On Jul 3, 2020, at 12:37 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> On 2020-06-26 21:34, Mike Christie wrote:
>> With Hannes not liking the refcounting/tricks in the sysfs approach
>> I took another stab at configfs. This approach works similar to the
>> loop/vhost/usb/xen nexus interface where there is a special file
>> that allows userspace to add/remove sessions.
> 
> Hi Mike,
> 
> Are you perhaps referring to the comment in the following message?
> https://urldefense.com/v3/__https://lore.kernel.org/linux-scsi/f0bd2a33-c084-6c9b-faa1-9d92bdb2df7a@suse.de/__;!!GqivPVa7Brio!L7jRHXS-8N1S4DIyD7kLwn1WPta5_ANJgQpJrI-fdmRlub6ViFCvtW0VCqwhN37bZMtc$ 

Yes.

> The duplication of strings in that patch also looks weird to me.
> I think kobject_del() waits for ongoing sysfs show and store callbacks to finish.

Nice!

I didn’t know that. I added that free_session callback for that reason. When testing I was just verifying that the callback was called when all refs to the file had dropped and didn’t check that it was actually device_del.


> Since patch 12/15 adds a kobject_del() call in target_sysfs_remove_session(), is
> that call perhaps sufficient to guarantee that the

Yes. It’s doable. There might be an issue with one driver, but I can fix that up.


> se_sess->se_node_acl->initiatorname pointer and similar pointers are all valid
> at least as long the session sysfs object exists?
> 
> Thanks,
> 
> Bart.

WARNING: multiple messages have this Message-ID (diff)
From: Michael Christie <michael.christie@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Hannes Reinecke <hare@suse.de>,
	Bodo Stroesser <bstroesser@ts.fujitsu.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [RFC PATCH 00/10] target: add configfs interface
Date: Fri, 3 Jul 2020 17:12:26 -0500	[thread overview]
Message-ID: <16CCC5B0-A73C-44D3-A413-DBFE23989D26@oracle.com> (raw)
In-Reply-To: <0b59d643-61bf-6876-cc42-83ee8040da10@acm.org>



> On Jul 3, 2020, at 12:37 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> On 2020-06-26 21:34, Mike Christie wrote:
>> With Hannes not liking the refcounting/tricks in the sysfs approach
>> I took another stab at configfs. This approach works similar to the
>> loop/vhost/usb/xen nexus interface where there is a special file
>> that allows userspace to add/remove sessions.
> 
> Hi Mike,
> 
> Are you perhaps referring to the comment in the following message?
> https://urldefense.com/v3/__https://lore.kernel.org/linux-scsi/f0bd2a33-c084-6c9b-faa1-9d92bdb2df7a@suse.de/__;!!GqivPVa7Brio!L7jRHXS-8N1S4DIyD7kLwn1WPta5_ANJgQpJrI-fdmRlub6ViFCvtW0VCqwhN37bZMtc$ 

Yes.

> The duplication of strings in that patch also looks weird to me.
> I think kobject_del() waits for ongoing sysfs show and store callbacks to finish.

Nice!

I didn’t know that. I added that free_session callback for that reason. When testing I was just verifying that the callback was called when all refs to the file had dropped and didn’t check that it was actually device_del.


> Since patch 12/15 adds a kobject_del() call in target_sysfs_remove_session(), is
> that call perhaps sufficient to guarantee that the

Yes. It’s doable. There might be an issue with one driver, but I can fix that up.


> se_sess->se_node_acl->initiatorname pointer and similar pointers are all valid
> at least as long the session sysfs object exists?
> 
> Thanks,
> 
> Bart.


  reply	other threads:[~2020-07-03 22:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-27  4:34 [RFC PATCH 00/10] target: add configfs interface Mike Christie
2020-06-27  4:34 ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 01/10] target: add common session id Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 02/10] iscsi target: replace module sids with lio's sid Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 03/10] target: drop sess_get_index Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 04/10] target: fix xcopy sess release leak Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 05/10] target: add free_session callout and use cfgfs refcounts Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 06/10] tcm_loop: fix nexus races Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 07/10] target: add return value to close_session Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 08/10] ibm,loop,vhost,xenscsi: add close_session callouts Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 09/10] target: add helper to close session synchronously Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-06-27  4:45   ` Mike Christie
2020-06-27  4:45     ` Mike Christie
2020-06-27  4:35 ` [RFC PATCH 10/10] target: export sessions via configfs Mike Christie
2020-06-27  4:35   ` Mike Christie
2020-07-03 12:51   ` Bodo Stroesser
2020-07-03 12:51     ` Bodo Stroesser
2020-07-03 16:27     ` Mike Christie
2020-07-03 16:27       ` Mike Christie
2020-07-03 16:57       ` Bodo Stroesser
2020-07-03 16:57         ` Bodo Stroesser
2020-07-03 21:19         ` Michael Christie
2020-07-03 21:19           ` Michael Christie
2020-07-06 12:32           ` Bodo Stroesser
2020-07-06 12:32             ` Bodo Stroesser
2020-07-03 17:37 ` [RFC PATCH 00/10] target: add configfs interface Bart Van Assche
2020-07-03 17:37   ` Bart Van Assche
2020-07-03 22:12   ` Michael Christie [this message]
2020-07-03 22:12     ` Michael Christie

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=16CCC5B0-A73C-44D3-A413-DBFE23989D26@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=bstroesser@ts.fujitsu.com \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.