diff options
author | Nicholas Bellinger <nab@daterainc.com> | 2013-08-22 17:17:20 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-09-10 19:48:46 -0400 |
commit | d397a445f43c7ae9b35260f236a08d5b5760de3d (patch) | |
tree | 9bc760fc767b73a5a20cba6e4ddd0154aa7003a6 /drivers/target/target_core_spc.c | |
parent | 04b1b7954649767f2ab9bf08cf2457e21d5c7167 (diff) |
target: Add Third Party Copy (3PC) bit in INQUIRY response
This patch adds the Third Party Copy (3PC) bit to signal support
for EXTENDED_COPY within standard inquiry response data.
Also add emulate_3pc 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: Roland Dreier <roland@purestorage.com>
Cc: Zach Brown <zab@redhat.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 'drivers/target/target_core_spc.c')
-rw-r--r-- | drivers/target/target_core_spc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c index 894e83bc223d..566dd2794679 100644 --- a/drivers/target/target_core_spc.c +++ b/drivers/target/target_core_spc.c | |||
@@ -95,6 +95,12 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) | |||
95 | */ | 95 | */ |
96 | spc_fill_alua_data(lun->lun_sep, buf); | 96 | spc_fill_alua_data(lun->lun_sep, buf); |
97 | 97 | ||
98 | /* | ||
99 | * Set Third-Party Copy (3PC) bit to indicate support for EXTENDED_COPY | ||
100 | */ | ||
101 | if (dev->dev_attrib.emulate_3pc) | ||
102 | buf[5] |= 0x8; | ||
103 | |||
98 | buf[7] = 0x2; /* CmdQue=1 */ | 104 | buf[7] = 0x2; /* CmdQue=1 */ |
99 | 105 | ||
100 | snprintf(&buf[8], 8, "LIO-ORG"); | 106 | snprintf(&buf[8], 8, "LIO-ORG"); |