mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Christoph Hellwig <hch@lst.de>
Cc: "Nicholas A. Bellinger" <nab@daterainc.com>,
	target-devel <target-devel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Sagi Grimberg <sagig@mellanox.com>,
	Hannes Reinecke <hare@suse.de>, Andy Grover <agrover@redhat.com>,
	Vasu Dev <vasu.dev@linux.intel.com>, Vu Pham <vu@mellanox.com>
Subject: Re: [PATCH-for-4.6 1/6] target: Add target_alloc_session() helper function
Date: Wed, 13 Jan 2016 00:09:26 -0800	[thread overview]
Message-ID: <1452672566.27508.44.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <20160112151119.GD2058@lst.de>

On Tue, 2016-01-12 at 16:11 +0100, Christoph Hellwig wrote:
> > +struct se_session *
> > +target_alloc_session(struct se_portal_group *tpg,
> > +		     unsigned int tag_num, unsigned int tag_size,
> > +		     enum target_prot_op prot_op,
> > +		     const char *initiatorname, void *private,
> > +		     int (*callback)(struct se_portal_group *,
> > +				     struct se_session *, void *))
> > +{
> 
> 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 rest of the consumers can just use this common code.

> > +	struct se_session *sess;
> > +
> > +	if (tag_num != 0 && !tag_size) {
> > +		pr_err("target_alloc_session called with percpu-ida tag_num:"
> > +		       " %u, but zero tag_size\n", tag_num);
> > +		return ERR_PTR(-EINVAL);
> > +	}
> > +	if (!tag_num && tag_size) {
> > +		pr_err("target_alloc_session called with percpu-ida tag_size:"
> > +		       " %u, but zero tag_num\n", tag_size);
> > +		return ERR_PTR(-EINVAL);
> > +	}
> 
> These checks should be in transport_alloc_session_tags.
> 

Done.

  reply	other threads:[~2016-01-13  8:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-10 20:44 [PATCH-for-4.6 0/6] target: Introduce target_alloc_session helper Nicholas A. Bellinger
2016-01-10 20:44 ` [PATCH-for-4.6 1/6] target: Add target_alloc_session() helper function Nicholas A. Bellinger
2016-01-11 22:10   ` Bart Van Assche
2016-01-12 15:11   ` Christoph Hellwig
2016-01-13  8:09     ` Nicholas A. Bellinger [this message]
2016-01-13  8:17       ` Christoph Hellwig
2016-01-13  9:22         ` Nicholas A. Bellinger
2016-01-13  9:33           ` Christoph Hellwig
2016-01-13 10:14             ` Nicholas A. Bellinger
2016-01-10 20:44 ` [PATCH-for-4.6 2/6] target: Convert demo-mode only drivers to target_alloc_session Nicholas A. Bellinger
2016-01-10 20:44 ` [PATCH-for-4.6 3/6] vhost/scsi: Convert to target_alloc_session usage Nicholas A. Bellinger
2016-01-10 21:32   ` Michael S. Tsirkin
2016-01-10 20:44 ` [PATCH-for-4.6 4/6] tcm_qla2xxx: " Nicholas A. Bellinger
2016-01-10 20:44 ` [PATCH-for-4.6 5/6] tcm_fc: " Nicholas A. Bellinger
2016-01-10 20:44 ` [PATCH-for-4.6 6/6] ib_srpt: " Nicholas A. Bellinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452672566.27508.44.camel@haakon3.risingtidesystems.com \
    --to=nab@linux-iscsi.org \
    --cc=agrover@redhat.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@daterainc.com \
    --cc=sagig@mellanox.com \
    --cc=target-devel@vger.kernel.org \
    --cc=vasu.dev@linux.intel.com \
    --cc=vu@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®