[SCSI] target: Add LIO target core v4.0.0-rc6
LIO target is a full featured in-kernel target framework with the
following feature set:
High-performance, non-blocking, multithreaded architecture with SIMD
support.
Advanced SCSI feature set:
* Persistent Reservations (PRs)
* Asymmetric Logical Unit Assignment (ALUA)
* Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
* Full Error Recovery (ERL=0,1,2)
* Active/active task migration and session continuation (ERL=2)
* Thin LUN provisioning (UNMAP and WRITE_SAMExx)
Multiprotocol target plugins
Storage media independence:
* Virtualization of all storage media; transparent mapping of IO to LUNs
* No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
* Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
Standards compliance:
* Full compliance with IETF (RFC 3720)
* Full implementation of SPC-4 PRs and ALUA
Significant code cleanups done by Christoph Hellwig.
[jejb: fix up for new block bdev exclusive interface. Minor fixes from
Randy Dunlap and Dan Carpenter.]
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-17 19:11:26 +00:00
|
|
|
#ifndef TARGET_CORE_RD_H
|
|
|
|
#define TARGET_CORE_RD_H
|
|
|
|
|
|
|
|
#define RD_HBA_VERSION "v4.0"
|
|
|
|
#define RD_MCP_VERSION "4.0"
|
|
|
|
|
|
|
|
/* Largest piece of memory kmalloc can allocate */
|
|
|
|
#define RD_MAX_ALLOCATION_SIZE 65536
|
|
|
|
#define RD_DEVICE_QUEUE_DEPTH 32
|
|
|
|
#define RD_MAX_DEVICE_QUEUE_DEPTH 128
|
|
|
|
#define RD_BLOCKSIZE 512
|
|
|
|
|
|
|
|
/* Used in target_core_init_configfs() for virtual LUN 0 access */
|
|
|
|
int __init rd_module_init(void);
|
|
|
|
void rd_module_exit(void);
|
|
|
|
|
|
|
|
struct rd_dev_sg_table {
|
|
|
|
u32 page_start_offset;
|
|
|
|
u32 page_end_offset;
|
|
|
|
u32 rd_sg_count;
|
|
|
|
struct scatterlist *sg_table;
|
|
|
|
} ____cacheline_aligned;
|
|
|
|
|
|
|
|
#define RDF_HAS_PAGE_COUNT 0x01
|
2013-05-11 23:16:49 +00:00
|
|
|
#define RDF_NULLIO 0x02
|
[SCSI] target: Add LIO target core v4.0.0-rc6
LIO target is a full featured in-kernel target framework with the
following feature set:
High-performance, non-blocking, multithreaded architecture with SIMD
support.
Advanced SCSI feature set:
* Persistent Reservations (PRs)
* Asymmetric Logical Unit Assignment (ALUA)
* Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
* Full Error Recovery (ERL=0,1,2)
* Active/active task migration and session continuation (ERL=2)
* Thin LUN provisioning (UNMAP and WRITE_SAMExx)
Multiprotocol target plugins
Storage media independence:
* Virtualization of all storage media; transparent mapping of IO to LUNs
* No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
* Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
Standards compliance:
* Full compliance with IETF (RFC 3720)
* Full implementation of SPC-4 PRs and ALUA
Significant code cleanups done by Christoph Hellwig.
[jejb: fix up for new block bdev exclusive interface. Minor fixes from
Randy Dunlap and Dan Carpenter.]
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-17 19:11:26 +00:00
|
|
|
|
|
|
|
struct rd_dev {
|
2012-10-08 04:03:19 +00:00
|
|
|
struct se_device dev;
|
[SCSI] target: Add LIO target core v4.0.0-rc6
LIO target is a full featured in-kernel target framework with the
following feature set:
High-performance, non-blocking, multithreaded architecture with SIMD
support.
Advanced SCSI feature set:
* Persistent Reservations (PRs)
* Asymmetric Logical Unit Assignment (ALUA)
* Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
* Full Error Recovery (ERL=0,1,2)
* Active/active task migration and session continuation (ERL=2)
* Thin LUN provisioning (UNMAP and WRITE_SAMExx)
Multiprotocol target plugins
Storage media independence:
* Virtualization of all storage media; transparent mapping of IO to LUNs
* No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
* Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
Standards compliance:
* Full compliance with IETF (RFC 3720)
* Full implementation of SPC-4 PRs and ALUA
Significant code cleanups done by Christoph Hellwig.
[jejb: fix up for new block bdev exclusive interface. Minor fixes from
Randy Dunlap and Dan Carpenter.]
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-17 19:11:26 +00:00
|
|
|
u32 rd_flags;
|
|
|
|
/* Unique Ramdisk Device ID in Ramdisk HBA */
|
|
|
|
u32 rd_dev_id;
|
|
|
|
/* Total page count for ramdisk device */
|
|
|
|
u32 rd_page_count;
|
|
|
|
/* Number of SG tables in sg_table_array */
|
|
|
|
u32 sg_table_count;
|
2014-01-07 23:24:14 +00:00
|
|
|
/* Number of SG tables in sg_prot_array */
|
|
|
|
u32 sg_prot_count;
|
[SCSI] target: Add LIO target core v4.0.0-rc6
LIO target is a full featured in-kernel target framework with the
following feature set:
High-performance, non-blocking, multithreaded architecture with SIMD
support.
Advanced SCSI feature set:
* Persistent Reservations (PRs)
* Asymmetric Logical Unit Assignment (ALUA)
* Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
* Full Error Recovery (ERL=0,1,2)
* Active/active task migration and session continuation (ERL=2)
* Thin LUN provisioning (UNMAP and WRITE_SAMExx)
Multiprotocol target plugins
Storage media independence:
* Virtualization of all storage media; transparent mapping of IO to LUNs
* No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
* Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
Standards compliance:
* Full compliance with IETF (RFC 3720)
* Full implementation of SPC-4 PRs and ALUA
Significant code cleanups done by Christoph Hellwig.
[jejb: fix up for new block bdev exclusive interface. Minor fixes from
Randy Dunlap and Dan Carpenter.]
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-17 19:11:26 +00:00
|
|
|
/* Array of rd_dev_sg_table_t containing scatterlists */
|
|
|
|
struct rd_dev_sg_table *sg_table_array;
|
2014-01-07 23:24:14 +00:00
|
|
|
/* Array of rd_dev_sg_table containing protection scatterlists */
|
|
|
|
struct rd_dev_sg_table *sg_prot_array;
|
[SCSI] target: Add LIO target core v4.0.0-rc6
LIO target is a full featured in-kernel target framework with the
following feature set:
High-performance, non-blocking, multithreaded architecture with SIMD
support.
Advanced SCSI feature set:
* Persistent Reservations (PRs)
* Asymmetric Logical Unit Assignment (ALUA)
* Protocol and intra-nexus multiplexing, load-balancing and failover (MC/S)
* Full Error Recovery (ERL=0,1,2)
* Active/active task migration and session continuation (ERL=2)
* Thin LUN provisioning (UNMAP and WRITE_SAMExx)
Multiprotocol target plugins
Storage media independence:
* Virtualization of all storage media; transparent mapping of IO to LUNs
* No hard limits on number of LUNs per Target; maximum LUN size ~750 TB
* Backstores: SATA, SAS, SCSI, BluRay, DVD, FLASH, USB, ramdisk, etc.
Standards compliance:
* Full compliance with IETF (RFC 3720)
* Full implementation of SPC-4 PRs and ALUA
Significant code cleanups done by Christoph Hellwig.
[jejb: fix up for new block bdev exclusive interface. Minor fixes from
Randy Dunlap and Dan Carpenter.]
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-17 19:11:26 +00:00
|
|
|
/* Ramdisk HBA device is connected to */
|
|
|
|
struct rd_host *rd_host;
|
|
|
|
} ____cacheline_aligned;
|
|
|
|
|
|
|
|
struct rd_host {
|
|
|
|
u32 rd_host_dev_id_count;
|
|
|
|
u32 rd_host_id; /* Unique Ramdisk Host ID */
|
|
|
|
} ____cacheline_aligned;
|
|
|
|
|
|
|
|
#endif /* TARGET_CORE_RD_H */
|