summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-01-23 19:29:38 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2014-01-25 06:58:53 +0000
commit76736db3e291246fbce9db856706af3454b0b078 (patch)
tree0dddd05312db6510a42de37659ccf4203466c9fa /include
parent676687c69697d2081d25afd14ee90937d1fb0c8e (diff)
downloadlinux-stable-76736db3e291246fbce9db856706af3454b0b078.tar.gz
linux-stable-76736db3e291246fbce9db856706af3454b0b078.tar.bz2
linux-stable-76736db3e291246fbce9db856706af3454b0b078.zip
target: Report bad sector in sense data for DIF errors
SPC-4 states that data-integrity errors shall also report the failed sector in CHECK_CONDITION response sense data information field. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include')
-rw-r--r--include/target/target_core_base.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 0336d70d0d9f..d28418645b00 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -37,6 +37,9 @@
/* Used by transport_send_check_condition_and_sense() */
#define SPC_SENSE_KEY_OFFSET 2
#define SPC_ADD_SENSE_LEN_OFFSET 7
+#define SPC_DESC_TYPE_OFFSET 8
+#define SPC_ADDITIONAL_DESC_LEN_OFFSET 9
+#define SPC_VALIDITY_OFFSET 10
#define SPC_ASC_KEY_OFFSET 12
#define SPC_ASCQ_KEY_OFFSET 13
#define TRANSPORT_IQN_LEN 224
@@ -560,7 +563,7 @@ struct se_cmd {
unsigned int t_prot_nents;
enum target_prot_ho prot_handover;
sense_reason_t pi_err;
- u32 block_num;
+ sector_t bad_sector;
};
struct se_ua {