diff options
| author | Jamie Pocas <jamie.pocas@emc.com> | 2015-11-29 17:44:57 -0500 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-01-06 16:39:55 -0500 |
| commit | e6f41633cb79b55ead84b023c02035322c7827e7 (patch) | |
| tree | 342f55892f82d100f496c8ed73f3570c8d956842 /include/target | |
| parent | ef8f46b549c2e425513ed568f18c827a37c08727 (diff) | |
target/sbc: Add LBPRZ attribute + control CDB emulation
This change sets the LBPRZ flag in EVPD page b2h and READ CAPACITY (16)
based on a new unmap_zeroes_data device attribute. This flag is set
automatically for iblock based on underlying block device queue's
discard_zeroes_data flag.
Signed-off-by: Jamie Pocas <jamie.pocas@emc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
| -rw-r--r-- | include/target/target_core_base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 0a2c74008e53..dc8b796dbcc7 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -63,6 +63,8 @@ | |||
| 63 | #define DA_UNMAP_GRANULARITY_DEFAULT 0 | 63 | #define DA_UNMAP_GRANULARITY_DEFAULT 0 |
| 64 | /* Default unmap_granularity_alignment */ | 64 | /* Default unmap_granularity_alignment */ |
| 65 | #define DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT 0 | 65 | #define DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT 0 |
| 66 | /* Default unmap_zeroes_data */ | ||
| 67 | #define DA_UNMAP_ZEROES_DATA_DEFAULT 0 | ||
| 66 | /* Default max_write_same_len, disabled by default */ | 68 | /* Default max_write_same_len, disabled by default */ |
| 67 | #define DA_MAX_WRITE_SAME_LEN 0 | 69 | #define DA_MAX_WRITE_SAME_LEN 0 |
| 68 | /* Use a model alias based on the configfs backend device name */ | 70 | /* Use a model alias based on the configfs backend device name */ |
| @@ -674,6 +676,7 @@ struct se_dev_attrib { | |||
| 674 | int force_pr_aptpl; | 676 | int force_pr_aptpl; |
| 675 | int is_nonrot; | 677 | int is_nonrot; |
| 676 | int emulate_rest_reord; | 678 | int emulate_rest_reord; |
| 679 | int unmap_zeroes_data; | ||
| 677 | u32 hw_block_size; | 680 | u32 hw_block_size; |
| 678 | u32 block_size; | 681 | u32 block_size; |
| 679 | u32 hw_max_sectors; | 682 | u32 hw_max_sectors; |
