Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753524AbbESGqU (ORCPT ); Tue, 19 May 2015 02:46:20 -0400 Received: from verein.lst.de ([213.95.11.211]:44866 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbbESGqO (ORCPT ); Tue, 19 May 2015 02:46:14 -0400 Date: Tue, 19 May 2015 08:46:12 +0200 From: Christoph Hellwig To: "Nicholas A. Bellinger" Cc: target-devel , linux-scsi , linux-kernel , Hannes Reinecke , Christoph Hellwig , Sagi Grimberg , Nicholas Bellinger Subject: Re: [PATCH 09/12] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist Message-ID: <20150519064612.GA30172@lst.de> References: <1431422736-29125-1-git-send-email-nab@daterainc.com> <1431422736-29125-10-git-send-email-nab@daterainc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431422736-29125-10-git-send-email-nab@daterainc.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1174 Lines: 26 On Tue, May 12, 2015 at 09:25:33AM +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > 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 call_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. FYI, you can also kill ->lun_status with this as only allocated se_lun structures will ever be on the list. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/