From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932910AbcAMKO2 (ORCPT ); Wed, 13 Jan 2016 05:14:28 -0500 Received: from mail.linux-iscsi.org ([67.23.28.174]:39775 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754403AbcAMKOX (ORCPT ); Wed, 13 Jan 2016 05:14:23 -0500 Message-ID: <1452680061.27508.93.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH-for-4.6 1/6] target: Add target_alloc_session() helper function From: "Nicholas A. Bellinger" To: Christoph Hellwig Cc: "Nicholas A. Bellinger" , target-devel , linux-scsi , lkml , Sagi Grimberg , Hannes Reinecke , Andy Grover , Vasu Dev , Vu Pham Date: Wed, 13 Jan 2016 02:14:21 -0800 In-Reply-To: <20160113093336.GB14377@lst.de> References: <1452458668-11034-1-git-send-email-nab@daterainc.com> <1452458668-11034-2-git-send-email-nab@daterainc.com> <20160112151119.GD2058@lst.de> <1452672566.27508.44.camel@haakon3.risingtidesystems.com> <20160113081700.GB12642@lst.de> <1452676969.27508.60.camel@haakon3.risingtidesystems.com> <20160113093336.GB14377@lst.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-01-13 at 10:33 +0100, Christoph Hellwig wrote: > On Wed, Jan 13, 2016 at 01:22:49AM -0800, Nicholas A. Bellinger wrote: > > Huh..? It's used by iscsi-target, ib_isert, tcm_qla2xxx, vhost-scsi and > > tcm_fc. > > > > That's the majority of the drivers people care about. > > ib_isert never calls transport_init_session / transport_init_session_tags > directly. > Yes. Not to mention, there is a new struct iscsit_transport based driver on the way that assumes percpu-ida tag preallocation using this same method. > We've got 3 callers to transport_init_session_tags vs 6 to > transport_init_session. > In that case, I'll look into converting sbp-target, usb-gadget and xen-scsiback to use percpu-ida like the other consumers here for v4.6 code. > iSCSI already works roughly the way I suggest everything should > work in the future - it uses transport_init_session but manually > allocates the tags. iscsi-target needs it open-coded for discovery purposes, because se_node_acl lookup does not occur. However for the normal session login se_node_acl lookup back, I don't see a reason why iscsi-target can't use target_alloc_session() here too.