Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbbEMF7s (ORCPT ); Wed, 13 May 2015 01:59:48 -0400 Received: from verein.lst.de ([213.95.11.211]:48311 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750956AbbEMF7r (ORCPT ); Wed, 13 May 2015 01:59:47 -0400 Date: Wed, 13 May 2015 07:59:45 +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 06/12] target/pr: Convert se_dev_entry to kref for RCU Message-ID: <20150513055945.GE20825@lst.de> References: <1431422736-29125-1-git-send-email-nab@daterainc.com> <1431422736-29125-7-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-7-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: 1684 Lines: 36 On Tue, May 12, 2015 at 09:25:30AM +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch converts se_dev_entry->pr_ref_count access to use modern > struct kref counting. > > It updates core_enable_device_list_for_node() to kref_init() when se_dev_entry > is being enabled, and updates core_disable_device_list_for_node() to kref_put() > and blocks on ->pr_comp waiting for outstanding PR references to drop. > > Also, go ahead and convert core_get_se_deve_from_rtpi() code to use pr_kref > for RELATIVE TARGET PORT IDENTIFIER lookup. This seems to be two very different things. Once a fix up of the ->se_deve access in the PR code, and second changing the way the references work. The kref change looks fine to me as a standalone patch. The RCU lookup changes really need to be squashed into the others, for one thing before this patch the PR code still tries to use ->device_list which isn't even maintained any more. It might be a good idea to grab these three patches from my older series and add them before your actual RCU changes to simplify the PR code in preparation of the RCU changes: http://git.infradead.org/users/hch/scsi.git/commitdiff/e9a71bda1a120e0488c5c4e4b2f17f14333e2dc6 http://git.infradead.org/users/hch/scsi.git/commitdiff/6372d9f62c83acb30d051387c40deb4dbdcaa376 http://git.infradead.org/users/hch/scsi.git/commitdiff/1c52408094cb831ee3c791b71ef631b9c5609d35 -- 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/