diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-07-16 09:28:05 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-07-24 07:54:21 +0200 |
commit | 4e4937e8aefde8d49340e803ebbedcdf4b43e5f0 (patch) | |
tree | ea9153817ac32402c68db2eb7b9b48d4a5cbcd6a /include/target | |
parent | scsi: Protect against buffer possible overflow in scsi_set_sense_information (diff) | |
download | linux-4e4937e8aefde8d49340e803ebbedcdf4b43e5f0.tar.xz linux-4e4937e8aefde8d49340e803ebbedcdf4b43e5f0.zip |
target: Return descriptor format sense data in case the LU spans 64bit sectors
In case a LU spans 64bit sectors, fixed size sense data information
field is only 32 bits which means the sector information will be truncated.
Thus, if the LU spans 64bit sectors, use descriptor format sense data to
correctly report sector information.
Reported-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_backend.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 1e5c8f949bae..56cf8e485ef2 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -93,4 +93,6 @@ bool target_lun_is_rdonly(struct se_cmd *); sense_reason_t passthrough_parse_cdb(struct se_cmd *cmd, sense_reason_t (*exec_cmd)(struct se_cmd *cmd)); +bool target_sense_desc_format(struct se_device *dev); + #endif /* TARGET_CORE_BACKEND_H */ |