Re: [PATCH] allow the HBA to reserve target and device private areas

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

 



On Tue, May 24, 2005 at 04:57:31PM -0500, James Bottomley wrote:
> +/* Private area maintenance. The driver requested allocations come
> + * directly after the transport class allocations (if any).  The idea
> + * is that you *must* call these only once.  The code assumes that the
> + * initial values are the ones the transport specific code requires */
> +static inline void
> +scsi_transport_reserve_target(struct scsi_transport_template * t, int space)
> +{
> +	t->target_private_offset = ALIGN(t->target_size, sizeof(void *));
> +	t->target_size = t->target_private_offset + space;
> +}
> +static inline void
> +scsi_transport_reserve_device(struct scsi_transport_template * t, int space)
> +{
> +	t->device_private_offset = ALIGN(t->device_size, sizeof(void *));
> +	t->device_size = t->device_private_offset + space;
> +}

Do we really need separate functions for this?  It would be so much nicer
to just have target_priv_size and device_priv_size members in the
foo_function_template.  Yes, it would mean having this in all different
transport templates, but in general having this as compile-time initializer
seems a lot nicer.

-
: 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