public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	Boaz Harrosh <bharrosh@panasas.com>
Subject: Re: [PATCH 1/2] consolidate command allocation in a single place
Date: Thu, 13 Mar 2008 11:09:25 -0600	[thread overview]
Message-ID: <20080313170924.GK613@parisc-linux.org> (raw)
In-Reply-To: <1205427192.2893.22.camel@localhost.localdomain>

On Thu, Mar 13, 2008 at 11:53:11AM -0500, James Bottomley wrote:
> Since the way we allocate commands with a separate sense buffer is
> getting complicated, we should isolate setup and teardown to a single
> routine so that if it gets even more complex, there's only one place
> in the code that needs to be altered.

> +static struct scsi_cmnd *
> +scsi_get_command_from_pool(struct scsi_host_cmd_pool *pool, gfp_t gfp_mask)
> +static void
> +scsi_put_command_to_pool(struct scsi_host_cmd_pool *pool,
> +			 struct scsi_cmnd *cmd)

The names are a bit clunky ... 'put command to pool'?  How about
alloc/free instead of get/put?  or:

scsi_pool_alloc_command(struct scsi_host_cmd_pool *pool, gfp_t gfp_mask)
scsi_pool_free_command(struct scsi_host_cmd_pool *pool, struct scsi_cmnd *cmd)

or even:

scsi_command_pool_alloc(struct scsi_host_cmd_pool *pool, gfp_t gfp_mask)
scsi_command_pool_free(struct scsi_host_cmd_pool *pool, struct scsi_cmnd *cmd)

(i also wouldn't object to use 'cmnd' or 'cmd' in place of 'command').

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2008-03-13 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 16:53 [PATCH 1/2] consolidate command allocation in a single place James Bottomley
2008-03-13 17:09 ` Matthew Wilcox [this message]
2008-03-13 17:15   ` James Bottomley
2008-03-17 18:25     ` James Bottomley

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