linux/drivers/target
Nicholas Bellinger 525a48a21d target: Fix task count > 1 handling breakage and use max_sector page alignment
This patch addresses recent breakage with multiple se_task (task_count > 1)
operation following backend dev->se_sub_dev->se_dev_attrib.max_sectors in new
transport_allocate_data_tasks() code.  The initial bug here was a bogus
task->task_sg_nents assignment in transport_allocate_data_tasks() based on
the passed parameter, which now uses DIV_ROUND_UP(task_size, PAGE_SIZE) to
determine the proper number of per task SGL entries for the (task_count > 1)
case.

This also means we now need to enforce a PAGE_SIZE aligned max_sector count
value for this to work as expected without bringing back the pre v3.1
transport_map_mem_to_sg() logic to handle SGL offsets across multiple tasks.
So this patch adds se_dev_align_max_sectors() to round down max_sectors as
necessary to ensure this alignment via se_dev_set_default_attribs() and
se_dev_align_max_sectors() and keeps it simple for (task_count > 1)
operation.

So far this bugfix has been tested with (task_count > 1) operation
using iscsi-target and iblock backends.

Reported-by: Chris Boot <bootc@bootc.net>
Cc: Kiran Patil <kiran.patil@intel.com>
Cc: Andy Grover <agrover@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2011-08-22 19:26:27 +00:00
..
iscsi iscsi-target: forever loop bug in iscsit_attach_ooo_cmdsn() 2011-08-22 19:26:19 +00:00
loopback target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
tcm_fc Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2011-08-03 15:12:09 -10:00
Kconfig iscsi-target: Add iSCSI fabric support for target v4.1 2011-07-26 09:16:43 +00:00
Makefile iscsi-target: Add iSCSI fabric support for target v4.1 2011-07-26 09:16:43 +00:00
target_core_alua.c target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_alua.h
target_core_cdb.c target: Remove duplicate task completions in transport_emulate_control_cdb 2011-08-22 19:26:23 +00:00
target_core_configfs.c target: fix typo Assoication -> Association 2011-07-22 09:37:49 +00:00
target_core_device.c target: Fix task count > 1 handling breakage and use max_sector page alignment 2011-08-22 19:26:27 +00:00
target_core_fabric_configfs.c target: Use ERR_CAST inlined function 2011-08-22 19:26:15 +00:00
target_core_fabric_lib.c target: remove custom hex2bin() implementation 2011-07-22 09:37:49 +00:00
target_core_file.c target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_file.h target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_hba.c target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_hba.h
target_core_iblock.c target: ->map_task_SG conversion to ->map_control_SG and ->map_data_SG 2011-07-22 09:37:48 +00:00
target_core_iblock.h target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_pr.c target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_pr.h target: Core cleanups from AGrover (round 1) 2011-07-22 09:37:43 +00:00
target_core_pscsi.c target: ->map_task_SG conversion to ->map_control_SG and ->map_data_SG 2011-07-22 09:37:48 +00:00
target_core_pscsi.h target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_rd.c target: Convert target_core_rd.c to use use BUG_ON 2011-08-22 19:26:17 +00:00
target_core_rd.h target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_scdb.c target: Pass 2nd param of transport_split_cdb by value 2011-07-22 09:37:48 +00:00
target_core_scdb.h target: Pass 2nd param of transport_split_cdb by value 2011-07-22 09:37:48 +00:00
target_core_stat.c target: Core cleanups from AGrover (round 1) 2011-07-22 09:37:43 +00:00
target_core_stat.h [SCSI] target: add initial statistics 2011-03-23 11:36:50 -05:00
target_core_tmr.c target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_tpg.c target: Make standard INQUIRY return 'not connected' for tpg_virt_lun0 2011-08-22 19:25:35 +00:00
target_core_transport.c target: Fix task count > 1 handling breakage and use max_sector page alignment 2011-08-22 19:26:27 +00:00
target_core_ua.c target: Follow up core updates from AGrover and HCH (round 4) 2011-07-22 09:37:48 +00:00
target_core_ua.h