linux/drivers/target
Gera Kazakov f730f9158f target: Fix >= v3.9+ regression in PR APTPL + ALUA metadata write-out
This patch fixes a >= v3.9+ regression in __core_scsi3_write_aptpl_to_file()
+ core_alua_write_tpg_metadata() write-out, where a return value of -EIO was
incorrectly being returned upon success.

This bug was originally introduced in:

commit 0e9b10a90f
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sat Feb 23 15:22:43 2013 -0500

    target: writev() on single-element vector is pointless

However, given that the return of core_scsi3_update_and_write_aptpl()
was not used to determine if a command should be returned with non GOOD
status, this bug was not being triggered in PR logic until v3.11-rc1 by
commit:

commit 459f213ba1
Author: Andy Grover <agrover@redhat.com>
Date:   Thu May 16 10:41:02 2013 -0700

    target: Allocate aptpl_buf inside update_and_write_aptpl()

So, go ahead and only return -EIO if kernel_write() returned a
negative value.

Reported-by: Gera Kazakov <gkazakov@msn.com>
Signed-off-by: Gera Kazakov <gkazakov@msn.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andy Grover <agrover@redhat.com>
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-09-10 20:23:33 -07:00
..
iscsi iscsi-target; Bump default CmdSN Depth to 64 2013-09-10 20:23:32 -07:00
loopback target: make queue_tm_rsp() return void 2013-07-07 18:36:53 -07:00
sbp target: make queue_tm_rsp() return void 2013-07-07 18:36:53 -07:00
tcm_fc target: replace strict_strto*() with kstrto*() 2013-08-12 20:31:44 -07:00
Kconfig sbp-target: Initial merge of firewire/ieee-1394 target mode support 2012-05-09 15:25:17 -07:00
Makefile target: Add support for EXTENDED_COPY copy offload emulation 2013-09-10 16:48:43 -07:00
target_core_alua.c target: Fix >= v3.9+ regression in PR APTPL + ALUA metadata write-out 2013-09-10 20:23:33 -07:00
target_core_alua.h target: pass sense_reason as a return value 2012-11-06 20:55:46 -08:00
target_core_configfs.c target: Enable global EXTENDED_COPY setup/release 2013-09-10 16:48:47 -07:00
target_core_device.c target: Add Third Party Copy (3PC) bit in INQUIRY response 2013-09-10 16:48:46 -07:00
target_core_fabric_configfs.c target: replace strict_strto*() with kstrto*() 2013-08-12 20:31:44 -07:00
target_core_fabric_lib.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_file.c target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction 2013-09-09 14:29:28 -07:00
target_core_file.h target/file: Bump FD_MAX_SECTORS to 2048 to handle 1M sized I/Os 2013-03-19 17:24:28 -07:00
target_core_hba.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_iblock.c target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction 2013-09-09 14:29:28 -07:00
target_core_iblock.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_internal.h target: Add Third Party Copy (3PC) bit in INQUIRY response 2013-09-10 16:48:46 -07:00
target_core_pr.c target: Fix >= v3.9+ regression in PR APTPL + ALUA metadata write-out 2013-09-10 20:23:33 -07:00
target_core_pr.h target: Alter core_pr_dump_initiator_port for ease of use 2013-06-14 00:04:31 -07:00
target_core_pscsi.c target/pscsi: remove an unneeded check 2013-09-09 14:29:23 -07:00
target_core_pscsi.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_rd.c target: Allow sbc_ops->execute_rw() to accept SGLs + data_direction 2013-09-09 14:29:28 -07:00
target_core_rd.h target/rd: Add ramdisk bit for NULLIO operation 2013-05-11 16:22:39 -07:00
target_core_sbc.c target: Release COMPARE_AND_WRITE mutex in generic failure path 2013-09-10 16:46:01 -07:00
target_core_spc.c target: Add Third Party Copy (3PC) bit in INQUIRY response 2013-09-10 16:48:46 -07:00
target_core_stat.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_tmr.c target: Remove legacy t_fe_count + avoid t_state_lock access in transport_put_cmd 2013-06-20 14:10:41 -07:00
target_core_tpg.c target: fix possible memory leak in core_tpg_register() 2013-03-18 12:45:52 -07:00
target_core_transport.c target: Make helpers non static for EXTENDED_COPY command setup 2013-09-10 16:48:39 -07:00
target_core_ua.c target: Update copyright information to 2012 2012-11-27 22:47:02 -08:00
target_core_ua.h target: pass sense_reason as a return value 2012-11-06 20:55:46 -08:00
target_core_xcopy.c target: remove unused including <linux/version.h> 2013-09-10 16:48:53 -07:00
target_core_xcopy.h target: Add support for EXTENDED_COPY copy offload emulation 2013-09-10 16:48:43 -07:00