Re: [PATCH 1/2] consolidate command allocation in a single place

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2008-03-13 at 11:09 -0600, Matthew Wilcox wrote:
> 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').

Yes, but it's following the naming convention in the file.  OK, I don't
like it as well, that's why the new functions in the following patch
have alloc/free.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux