From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755606AbcAMIRE (ORCPT ); Wed, 13 Jan 2016 03:17:04 -0500 Received: from verein.lst.de ([213.95.11.211]:41566 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbcAMIRC (ORCPT ); Wed, 13 Jan 2016 03:17:02 -0500 Date: Wed, 13 Jan 2016 09:17:00 +0100 From: Christoph Hellwig To: "Nicholas A. Bellinger" Cc: Christoph Hellwig , "Nicholas A. Bellinger" , target-devel , linux-scsi , lkml , Sagi Grimberg , Hannes Reinecke , Andy Grover , Vasu Dev , Vu Pham Subject: Re: [PATCH-for-4.6 1/6] target: Add target_alloc_session() helper function Message-ID: <20160113081700.GB12642@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452672566.27508.44.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 On Wed, Jan 13, 2016 at 12:09:26AM -0800, Nicholas A. Bellinger wrote: > > I'd much rather have the fabrics drivers call transport_alloc_session_tags > > directly from the callback than growing even more arguments here. > > > > What's the point..? > > Only vhost-scsi currently needs to allocate extra resources for > se_session percpu-ida tag pre-allocation. The point is that allocating "tags" (or better command structures) isn't fundamentally related to allocating a session, and in fact not even used by many drivers. A flow where drivers that need these "tags" explicitly allocate them is a lot more obvious than forcing more arguments to a function that already has a lot and isn't related to these "tags" otherwise.