aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-03-14 13:12:03 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-03-15 22:14:48 -0400
commit1f6fa8f8179dd66345d59f067f2a48a86095c499 (patch)
tree9ab51aafe013436934b5683d911c846cc655ffdf /drivers/target
parent9765b1f327951e643a97f43924d1fbeb4e90ffba (diff)
target: Remove hack to make READ CAPACITY(10) lie if thin provisioning is enabled
Remove the hack that has READ CAPACITY(10) return 0xFFFFFFFF as the number of sectors when thin provisioning is enabled. This is supposed to trigger the initiator to use READ CAPACITY(16) in this case so that it finds out about thin provisioning. But an initiator that cares about thin provisioning is going to ask anyway, and an initiator that doesn't know about READ CAPACITY(16) is going to get the wrong capacity. So just have READ CAPACITY(10) return the size it's supposed to. Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_cdb.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c
index 41ca2d43377b..30a67707036f 100644
--- a/drivers/target/target_core_cdb.c
+++ b/drivers/target/target_core_cdb.c
@@ -694,11 +694,6 @@ int target_emulate_readcapacity(struct se_task *task)
694 buf[5] = (dev->se_sub_dev->se_dev_attrib.block_size >> 16) & 0xff; 694 buf[5] = (dev->se_sub_dev->se_dev_attrib.block_size >> 16) & 0xff;
695 buf[6] = (dev->se_sub_dev->se_dev_attrib.block_size >> 8) & 0xff; 695 buf[6] = (dev->se_sub_dev->se_dev_attrib.block_size >> 8) & 0xff;
696 buf[7] = dev->se_sub_dev->se_dev_attrib.block_size & 0xff; 696 buf[7] = dev->se_sub_dev->se_dev_attrib.block_size & 0xff;
697 /*
698 * Set max 32-bit blocks to signal SERVICE ACTION READ_CAPACITY_16
699 */
700 if (dev->se_sub_dev->se_dev_attrib.emulate_tpu || dev->se_sub_dev->se_dev_attrib.emulate_tpws)
701 put_unaligned_be32(0xFFFFFFFF, &buf[0]);
702 697
703 transport_kunmap_data_sg(cmd); 698 transport_kunmap_data_sg(cmd);
704 699