summaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@daterainc.com>2013-08-21 01:24:09 +0400
committerNicholas Bellinger <nab@linux-iscsi.org>2013-09-10 01:29:35 +0400
commit0123a9ec6a4fea20d5afea90c9b47fb73fb1bc34 (patch)
tree6ac9f2539a9db0013757f51b18a97f3bf8ded49a /include/target
parent76dde50ebef75773ea2b68e0bf914e87e6a3711c (diff)
downloadlinux-0123a9ec6a4fea20d5afea90c9b47fb73fb1bc34.tar.xz
target: Add MAXIMUM COMPARE AND WRITE LENGTH in Block Limits VPD
This patch adds the MAXIMUM COMPARE AND WRITE LENGTH bit, currently hardcoded to a single logical block (NoLB=1) within the Block Limits VPD in spc_emulate_evpd_b0(). Also add emulate_caw device attribute in configfs (enabled by default) to allow the exposure of this bit to be disabled, if necessary. Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Martin Petersen <martin.petersen@oracle.com> Cc: Chris Mason <chris.mason@fusionio.com> Cc: James Bottomley <JBottomley@Parallels.com> Cc: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
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 7fdb3fae2961..61a4dc890701 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -97,6 +97,8 @@
* block/blk-lib.c:blkdev_issue_discard()
*/
#define DA_EMULATE_TPWS 0
+/* Emulation for CompareAndWrite (AtomicTestandSet) by default */
+#define DA_EMULATE_CAW 1
/* No Emulation for PSCSI by default */
#define DA_EMULATE_ALUA 0
/* Enforce SCSI Initiator Port TransportID with 'ISID' for PR */
@@ -602,6 +604,7 @@ struct se_dev_attrib {
int emulate_tas;
int emulate_tpu;
int emulate_tpws;
+ int emulate_caw;
int enforce_pr_isids;
int is_nonrot;
int emulate_rest_reord;