Re: [PATCH 1/2] target: move backend attribute implementation back into the core code

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

 



On Thu, 2015-04-30 at 13:36 +0200, Christoph Hellwig wrote:
> Instead of duplicating large amounts of code in each back end driver move
> the attributes back into common code where they used to be.  To avoid the
> stubs for the passthrough backend case where set different attributes based
> on the transport_type flag in struct se_subsytem_api.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  drivers/target/target_core_configfs.c         | 259 +++++++++++++++++++++-----
>  drivers/target/target_core_device.c           |  25 ---
>  drivers/target/target_core_file.c             |  41 ----
>  drivers/target/target_core_iblock.c           |  41 ----
>  drivers/target/target_core_internal.h         |  27 +++
>  drivers/target/target_core_pscsi.c            |  26 ---
>  drivers/target/target_core_rd.c               |  49 +----
>  drivers/target/target_core_user.c             |  40 ----
>  include/target/target_core_backend.h          |  43 -----
>  include/target/target_core_backend_configfs.h | 118 ------------
>  10 files changed, 239 insertions(+), 430 deletions(-)
>  delete mode 100644 include/target/target_core_backend_configfs.h
> 

I want to keep the ability for individual backends to define their own
attributes at runtime.

That said, I'd rather move the original two types (IBLOCK, FILEIO,
RAMDISK type + PSCSI type) into a common set of macros to reduce
duplication, but still leave enough flexibility for new TCMU attributes
or a future NVMe backend driver.

The patch #2 type macros and moving of functions into
target_core_configfs.c look fine to me..

--nab

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




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux