public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@daterainc.com>
Cc: target-devel <target-devel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagig@mellanox.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	Chris Boot <bootc@bootc.net>
Subject: Re: [PATCH-v2 5/9] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist
Date: Fri, 22 May 2015 10:31:13 +0200	[thread overview]
Message-ID: <20150522083113.GC24640@lst.de> (raw)
In-Reply-To: <1432275071-28882-6-git-send-email-nab@daterainc.com>

> This patch converts the fixed size se_portal_group->tpg_lun_list[]
> to use modern RCU with hlist_head in order to support an arbitary
> number of se_lun ports per target endpoint.
> 
> It includes dropping core_tpg_alloc_lun() from core_dev_add_lun(),
> and calling it directly from target_fabric_make_lun() to allocate
> a new se_lun.
> 
> Also add a new target_fabric_port_release() configfs item callback
> to invoke kfree_rcu() to release memory during se_lun->lun_group
> shutdown.
> 
> Also now that se_node_acl->lun_entry_hlist is using RCU, convert
> existing tpg_lun_lock to struct mutex so core_tpg_add_node_to_devs()
> can perform RCU updater logic without releasing ->tpg_lun_mutex.

Still doesn't explain why core_tpg_clear_object_luns also disappears.

> +	hlist_for_each_entry_rcu(lun, &tpg->tpg_lun_hlist, link) {
>  		if (lun->lun_status != TRANSPORT_LUN_STATUS_ACTIVE)
>  			continue;

lun_status will always be active here as that's set and cleared at the
same time as the list addition / removal.  Which means that lun_status
should go away in this patch.


  reply	other threads:[~2015-05-22  8:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  6:11 [PATCH-v2 0/9] target: se_node_acl + se_lun RCU conversions Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 1/9] target: Convert se_node_acl->device_list[] to RCU hlist Nicholas A. Bellinger
2015-05-22  8:24   ` Christoph Hellwig
2015-05-22  8:55     ` Nicholas A. Bellinger
2015-05-22 11:31       ` Christoph Hellwig
2015-05-25 22:14         ` Nicholas A. Bellinger
2015-05-26  4:11           ` Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg reservation check Nicholas A. Bellinger
2015-05-22  8:26   ` Christoph Hellwig
2015-05-22  9:05     ` Nicholas A. Bellinger
2015-05-22 11:34       ` Christoph Hellwig
2015-05-25 22:25         ` Nicholas A. Bellinger
2015-05-22 10:12   ` Bart Van Assche
2015-05-25 21:59     ` Nicholas A. Bellinger
2015-05-22 11:52   ` Christoph Hellwig
2015-05-25 22:54     ` Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 3/9] target/pr: Change alloc_registration to avoid pr_reg_tg_pt_lun Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 4/9] target/pr: cleanup core_scsi3_pr_seq_non_holder Nicholas A. Bellinger
2015-05-22  8:26   ` Christoph Hellwig
2015-05-22  6:11 ` [PATCH-v2 5/9] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist Nicholas A. Bellinger
2015-05-22  8:31   ` Christoph Hellwig [this message]
2015-05-22  8:48     ` Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 6/9] target: Convert se_tpg->acl_node_lock to ->acl_node_mutex Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 7/9] target: Convert core_tpg_deregister to use list splice Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 8/9] target: Drop unused se_lun->lun_acl_list Nicholas A. Bellinger
2015-05-22  6:11 ` [PATCH-v2 9/9] target: Only reset specific dynamic entries during lun_group creation Nicholas A. Bellinger
2015-05-22  6:23 ` [PATCH-v2 0/9] target: se_node_acl + se_lun RCU conversions Hannes Reinecke
2015-05-22  8:07 ` Christoph Hellwig
2015-05-22  8:18   ` Nicholas A. Bellinger
2015-05-22 10:15 ` Bart Van Assche
2015-05-25 22:01   ` Nicholas A. Bellinger

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=20150522083113.GC24640@lst.de \
    --to=hch@lst.de \
    --cc=bootc@bootc.net \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@daterainc.com \
    --cc=nab@linux-iscsi.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=sagig@mellanox.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