diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-01-23 19:29:38 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-01-25 06:58:53 +0000 |
commit | 76736db3e291246fbce9db856706af3454b0b078 (patch) | |
tree | 0dddd05312db6510a42de37659ccf4203466c9fa /drivers/target/target_core_sbc.c | |
parent | 676687c69697d2081d25afd14ee90937d1fb0c8e (diff) | |
download | lwn-76736db3e291246fbce9db856706af3454b0b078.tar.gz lwn-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 'drivers/target/target_core_sbc.c')
-rw-r--r-- | drivers/target/target_core_sbc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index 75364c7f6219..fa3cae393e13 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -1131,6 +1131,7 @@ sbc_dif_verify_write(struct se_cmd *cmd, sector_t start, unsigned int sectors, if (rc) { kunmap_atomic(paddr); kunmap_atomic(daddr); + cmd->bad_sector = sector; return rc; } @@ -1191,6 +1192,7 @@ sbc_dif_verify_read(struct se_cmd *cmd, sector_t start, unsigned int sectors, if (rc) { kunmap_atomic(paddr); kunmap_atomic(daddr); + cmd->bad_sector = sector; return rc; } |