Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbbEQQvw (ORCPT ); Sun, 17 May 2015 12:51:52 -0400 Received: from verein.lst.de ([213.95.11.211]:38056 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbbEQQvo (ORCPT ); Sun, 17 May 2015 12:51:44 -0400 Date: Sun, 17 May 2015 18:51:42 +0200 From: Christoph Hellwig To: "Nicholas A. Bellinger" Cc: Christoph Hellwig , "Nicholas A. Bellinger" , target-devel , linux-scsi , linux-kernel , Hannes Reinecke , Sagi Grimberg Subject: Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist Message-ID: <20150517165142.GA17217@lst.de> References: <1431422736-29125-1-git-send-email-nab@daterainc.com> <1431422736-29125-2-git-send-email-nab@daterainc.com> <20150513063555.GA21770@lst.de> <1431506771.26897.78.camel@haakon3.risingtidesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431506771.26897.78.camel@haakon3.risingtidesystems.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: 943 Lines: 17 On Wed, May 13, 2015 at 01:46:11AM -0700, Nicholas A. Bellinger wrote: > Updated to use a mirror lun->lun_rtpi, with the assignment from sep_rtpi > occuring in core_dev_export() code. >From looking at your current tree I suspect freeing the se_port structure using kfree_rcu might be a better idea. Together with dropping the references to the se_device from call_rcu context this basically means all pointers in struct se_lun are rcu protected which is much safer if you want to access struct se_lun under rcu protection, as this avoids having to deal with special cases. Additionally that basically allows you to replace lun_sep_lock with rcu_read_lock for anything remotely like a fast path. -- 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/