aboutsummaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorTregaron Bayly <tregaron@baylys.org>2013-01-31 17:30:24 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2013-02-13 14:27:58 -0500
commitadfa9570a56c3dbfc2a28baab77ff6f0b8f480d3 (patch)
tree3d0fcb992e2cf56c8a88cac6861c276f4ad7b088 /include/target
parent0e48e7a5a345a727d5fd7a06bd6a9e6a67eae2bd (diff)
target: Add device attribute to expose config_item_name for INQUIRY model
This patch changes LIO to use the configfs backend device name as the model if you echo '1' to an individual device's emulate_model_alias attribute. This is a valid operation only on devices with an export count of 0. Signed-off-by: Tregaron Bayly <tbayly@bluehost.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 199b0ad1a55e..df14dce59191 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -75,6 +75,8 @@
75#define DA_MAX_WRITE_SAME_LEN 0 75#define DA_MAX_WRITE_SAME_LEN 0
76/* Default max transfer length */ 76/* Default max transfer length */
77#define DA_FABRIC_MAX_SECTORS 8192 77#define DA_FABRIC_MAX_SECTORS 8192
78/* Use a model alias based on the configfs backend device name */
79#define DA_EMULATE_MODEL_ALIAS 0
78/* Emulation for Direct Page Out */ 80/* Emulation for Direct Page Out */
79#define DA_EMULATE_DPO 0 81#define DA_EMULATE_DPO 0
80/* Emulation for Forced Unit Access WRITEs */ 82/* Emulation for Forced Unit Access WRITEs */
@@ -591,6 +593,7 @@ struct se_dev_entry {
591}; 593};
592 594
593struct se_dev_attrib { 595struct se_dev_attrib {
596 int emulate_model_alias;
594 int emulate_dpo; 597 int emulate_dpo;
595 int emulate_fua_write; 598 int emulate_fua_write;
596 int emulate_fua_read; 599 int emulate_fua_read;