1
0
Fork 0
alistair23-linux/drivers/target
Bart Van Assche aa73237dcb scsi: target/core: Always call transport_complete_callback() upon failure
COMPARE AND WRITE command execution starts with a call of
sbc_compare_and_write(). That function locks the caw_sem member in the
backend device data structure and submits a read request to the backend
driver. Upon successful completion of the read compare_and_write_callback()
gets called. That last function compares the data that has been read. If it
matches transport_complete_callback is set to compare_and_write_post and a
write request is submitted. compare_and_write_post() submits a write request
to the backend driver.

XDWRITEREAD command execution starts with sbc_execute_rw() submitting a
read to the backend device. Upon successful completion of the read the
xdreadwrite_callback() gets called. That function xors the data that has
been read with the data in the data-out buffer and stores the result in
the data-in buffer.

Call transport_complete_callback() not only if COMPARE AND WRITE fails but
also if XDWRITEREAD fails. This makes the code more systematic. Make sure
that the callback functions handle (cmd, false, NULL) argument triples fine.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-16 01:13:35 -04:00
..
iscsi scsi: target: stash sess_err_stats on Data-Out timeout 2018-10-16 00:38:37 -04:00
loopback SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
sbp scsi: target: srp, vscsi, sbp, qla: use target_remove_session 2018-08-02 15:29:31 -04:00
tcm_fc scsi: tcm_fc: use target_remove_session 2018-08-02 15:29:31 -04:00
Kconfig target: don't depend on SCSI 2018-08-02 15:19:49 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_alua.c target: fix ALUA state file path truncation 2017-11-04 15:00:30 -07:00
target_core_alua.h Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-11-24 19:19:20 -10:00
target_core_configfs.c scsi: target: add helper to check if dev is configured 2018-07-30 23:17:53 -04:00
target_core_device.c scsi: target: add helper to check if dev is configured 2018-07-30 23:17:53 -04:00
target_core_fabric_configfs.c scsi: target: add helper to check if dev is configured 2018-07-30 23:17:53 -04:00
target_core_fabric_lib.c target-core: don't use "const char*" for a buffer that is written to 2018-01-12 15:07:09 -08:00
target_core_file.c scsi: target: target/file: Add support of direct and async I/O 2018-05-14 22:40:08 -04:00
target_core_file.h scsi: target: target/file: Add support of direct and async I/O 2018-05-14 22:40:08 -04:00
target_core_hba.c target: Fix target_sense_desc_format NULL pointer dereference 2015-09-24 23:17:23 -07:00
target_core_iblock.c scsi: target/core: Use the SECTOR_SHIFT constant 2018-10-16 01:13:35 -04:00
target_core_iblock.h scsi: target/core: Use the SECTOR_SHIFT constant 2018-10-16 01:13:35 -04:00
target_core_internal.h scsi: target: Fold core_tmr_handle_tas_abort() into transport_cmd_finish_abort() 2018-07-02 16:44:31 -04:00
target_core_pr.c scsi: target: Fix truncated PR-in ReadKeys response 2018-06-19 21:36:37 -04:00
target_core_pr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_pscsi.c SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
target_core_pscsi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_rd.c target: break up free_device callback 2017-07-06 23:11:37 -07:00
target_core_rd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
target_core_sbc.c scsi: target/core: Always call transport_complete_callback() upon failure 2018-10-16 01:13:35 -04:00
target_core_spc.c target: Fix cmd size for PR-OUT in passthrough_parse_cdb 2017-07-09 20:58:49 -07:00
target_core_stat.c target: make config_item_type const 2017-10-19 16:15:17 +02:00
target_core_tmr.c scsi: target: Fold core_tmr_handle_tas_abort() into transport_cmd_finish_abort() 2018-07-02 16:44:31 -04:00
target_core_tpg.c target: Fix node_acl demo-mode + uncached dynamic shutdown regression 2017-08-09 20:55:19 -07:00
target_core_transport.c scsi: target/core: Always call transport_complete_callback() upon failure 2018-10-16 01:13:35 -04:00
target_core_ua.c scsi: target: Remove se_dev_entry.ua_count 2018-07-02 16:44:32 -04:00
target_core_ua.h scsi: target: Fix handling of removed LUNs 2018-07-02 16:44:32 -04:00
target_core_user.c SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
target_core_xcopy.c scsi: target/core: Remove an unused data member from struct xcopy_pt_cmd 2018-10-16 01:13:35 -04:00
target_core_xcopy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00