diff options
author | Nicholas Bellinger <nab@daterainc.com> | 2013-08-22 14:17:20 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-09-10 16:48:46 -0700 |
commit | d397a445f43c7ae9b35260f236a08d5b5760de3d (patch) | |
tree | 9bc760fc767b73a5a20cba6e4ddd0154aa7003a6 /drivers/target/target_core_spc.c | |
parent | 04b1b7954649767f2ab9bf08cf2457e21d5c7167 (diff) | |
download | op-kernel-dev-d397a445f43c7ae9b35260f236a08d5b5760de3d.zip op-kernel-dev-d397a445f43c7ae9b35260f236a08d5b5760de3d.tar.gz |
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 894e83b..566dd27 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) */ spc_fill_alua_data(lun->lun_sep, buf); + /* + * Set Third-Party Copy (3PC) bit to indicate support for EXTENDED_COPY + */ + if (dev->dev_attrib.emulate_3pc) + buf[5] |= 0x8; + buf[7] = 0x2; /* CmdQue=1 */ snprintf(&buf[8], 8, "LIO-ORG"); |