diff options
author | Andy Grover <agrover@redhat.com> | 2013-11-11 17:59:17 +0100 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-11-12 22:44:54 +0100 |
commit | 7f7caf6aa74a4f4ad21ebe08bf23b594fce45ca7 (patch) | |
tree | 058c55e859712486b9f6a8a20f3ea46add3a30eb /include/target | |
parent | iser-target: Avoid using FRMR for single dma entry requests (diff) | |
download | linux-7f7caf6aa74a4f4ad21ebe08bf23b594fce45ca7.tar.xz linux-7f7caf6aa74a4f4ad21ebe08bf23b594fce45ca7.zip |
target: Pass through I/O topology for block backstores
In addition to block size (already implemented), passing through
alignment offset, logical-to-phys block exponent, I/O granularity and
optimal I/O length will allow initiators to properly handle layout on
LUNs with 4K block sizes.
Tested with various weird values via scsi_debug module.
One thing to look at with this patch is the new block limits values --
instead of granularity 1 optimal 8192, Lio will now be returning whatever
the block device says, which may affect performance.
Signed-off-by: Andy Grover <agrover@redhat.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_backend.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 5ebe21cd5d1c..39e0114d70c5 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -34,6 +34,11 @@ struct se_subsystem_api { sense_reason_t (*parse_cdb)(struct se_cmd *cmd); u32 (*get_device_type)(struct se_device *); sector_t (*get_blocks)(struct se_device *); + sector_t (*get_alignment_offset_lbas)(struct se_device *); + /* lbppbe = logical blocks per physical block exponent. see SBC-3 */ + unsigned int (*get_lbppbe)(struct se_device *); + unsigned int (*get_io_min)(struct se_device *); + unsigned int (*get_io_opt)(struct se_device *); unsigned char *(*get_sense_buffer)(struct se_cmd *); bool (*get_write_cache)(struct se_device *); }; |