public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	Matthew Wilcox <matthew@wil.cx>
Subject: Re: [PATCH 2/2] export command allocation and freeing functions	independently of the host
Date: Thu, 13 Mar 2008 20:34:15 +0200	[thread overview]
Message-ID: <47D973A7.10307@panasas.com> (raw)
In-Reply-To: <1205432452.2893.44.camel@localhost.localdomain>

On Thu, Mar 13 2008 at 20:20 +0200, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> On Thu, 2008-03-13 at 20:01 +0200, Boaz Harrosh wrote:
>> On Thu, Mar 13 2008 at 19:46 +0200, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
>>> On Thu, 2008-03-13 at 19:39 +0200, Boaz Harrosh wrote:
>>>> On Thu, Mar 13 2008 at 18:53 +0200, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
>>>> Looking long term. This will clash with Matthew Wilcox's effort of 
>>>> overridable per host command pool.
>>> Not really, since the design is to obtain commands outside of the normal
>>> host pool allocations for special purposes.  All that needs to be
>>> updated for the per host override is the setup and teardown path, which
>>> can be done in a few lines.
>>>
>> Again the concept was that an host might want a special size command for
>> the + host_priv additions that will get allocated once. This still applies
>> with "special purpose" commands, they need to be the size the host expects
>> them to be, so it can use container_of() macro to retrieve the real structure.
>> (Or any other dynamic size calculations)
> 
> Well, the currently presented interface is to tidy up the command use
> for precisely two drivers, neither of which seems to want to use special
> sized commands.  Even if that patch set were ready for merging (which it
> isn't), adding it to the command allocators with no users would still be
> over engineering.
> 
>>>>  I do have a scsi_host in the USB
>>>> initialization. Perhaps:
>>>>
>>>> +struct scsi_cmnd *scsi_allocate_command(struct Scsi_Host*, gfp_t gfp_mask);
>>>> +void scsi_free_command(gfp_t gfp_mask, struct scsi_cmnd *cmd);
>>> James
>>>
>> I guess it can change later when needed. Just that I wanted that new users of the
>> API get used to the need of an Scsi_Host
> 
> Yes, for just two users, particularly when there's doubt over whether
> they'd even need the potential feature set, simpler is better.
> 
> James
> 

Do you mean gdth? No I think gdth is not a user of this above new API.
gdth's patch I sent should be as it is.

I know of only one client of the new API presented here. isd200?

Boaz


      reply	other threads:[~2008-03-13 18:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 16:53 [PATCH 2/2] export command allocation and freeing functions independently of the host James Bottomley
2008-03-13 17:04 ` Boaz Harrosh
2008-03-13 17:35   ` James Bottomley
2008-03-13 17:42     ` Boaz Harrosh
2008-03-13 21:44   ` Andi Kleen
2008-03-13 17:39 ` Boaz Harrosh
2008-03-13 17:46   ` James Bottomley
2008-03-13 18:01     ` Boaz Harrosh
2008-03-13 18:20       ` James Bottomley
2008-03-13 18:34         ` Boaz Harrosh [this message]

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=47D973A7.10307@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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