linux/include
Mike Christie bda69f1aae SCSI: add 1024 max sectors black list flag
[ Upstream commit 35e9a9f939 ]

This works around a issue with qnap iscsi targets not handling large IOs
very well.

The target returns:

VPD INQUIRY: Block limits page (SBC)
  Maximum compare and write length: 1 blocks
  Optimal transfer length granularity: 1 blocks
  Maximum transfer length: 4294967295 blocks
  Optimal transfer length: 4294967295 blocks
  Maximum prefetch, xdread, xdwrite transfer length: 0 blocks
  Maximum unmap LBA count: 8388607
  Maximum unmap block descriptor count: 1
  Optimal unmap granularity: 16383
  Unmap granularity alignment valid: 0
  Unmap granularity alignment: 0
  Maximum write same length: 0xffffffff blocks
  Maximum atomic transfer length: 0
  Atomic alignment: 0
  Atomic transfer length granularity: 0

and it is *sometimes* able to handle at least one IO of size up to 8 MB. We
have seen in traces where it will sometimes work, but other times it
looks like it fails and it looks like it returns failures if we send
multiple large IOs sometimes. Also it looks like it can return 2 different
errors. It will sometimes send iscsi reject errors indicating out of
resources or it will send invalid cdb illegal requests check conditions.
And then when it sends iscsi rejects it does not seem to handle retries
when there are command sequence holes, so I could not just add code to
try and gracefully handle that error code.

The problem is that we do not have a good contact for the company,
so we are not able to determine under what conditions it returns
which error and why it sometimes works.

So, this patch just adds a new black list flag to set targets like this to
the old max safe sectors of 1024. The max_hw_sectors changes added in 3.19
caused this regression, so I also ccing stable.

Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: stable@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-08-06 14:49:50 -04:00
..
acpi ACPICA: Tables: Fix an issue that FACS initialization is performed twice 2015-08-04 14:33:56 -04:00
asm-generic mmu_gather: move minimal range calculations into generic code 2015-03-28 09:22:01 -04:00
clocksource ARM: pxa: Add non device-tree timer link to clocksource 2014-07-23 12:02:39 +02:00
crypto crypto: LLVMLinux: Add macro to remove use of VLAIS in crypto code 2014-10-14 10:51:22 +02:00
drm drm/radeon: add new bonaire pci id 2015-06-10 13:42:41 -04:00
dt-bindings The fixes for the clock framework are all regressions in drivers, plus a 2014-11-25 17:52:56 -08:00
keys KEYS: Restore partial ID matching functionality for asymmetric keys 2014-10-06 15:21:05 +01:00
kvm arm/arm64: KVM: Keep elrsr/aisr in sync with software model 2015-05-11 07:07:37 -04:00
linux of: return NUMA_NO_NODE from fallback of_node_to_nid() 2015-08-04 14:39:26 -04:00
math-emu math-emu: fix floating-point to integer overflow detection 2014-01-07 18:36:24 -06:00
media Merge branch 'patchwork' into v4l_for_linus 2014-10-09 14:00:54 -03:00
memory ddr: add LPDDR2 data from JESD209-2 2012-05-02 00:04:06 -07:00
misc cxl: Add new header for call backs and structs 2014-10-08 20:15:43 +11:00
net sctp: fix ASCONF list handling 2015-07-05 10:12:58 -04:00
pcmcia pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate 2013-03-15 12:26:03 -07:00
ras PCI/AER: Rename PCI_ERR_UNC_TRAIN to PCI_ERR_UNC_UND 2014-09-25 09:42:40 -06:00
rdma IB/mlx5, iser, isert: Add Signature API additions 2014-10-09 00:10:53 -07:00
rxrpc include/rxrpc/types.h: Remove unused header 2014-08-29 20:33:39 -07:00
scsi SCSI: add 1024 max sectors black list flag 2015-08-06 14:49:50 -04:00
soc/tegra ARM: tegra: Convert PMC to a driver 2014-07-17 14:58:43 +02:00
sound ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE 2015-05-17 19:12:39 -04:00
target target: Fix COMPARE_AND_WRITE with SG_TO_MEM_NOALLOC handling 2015-05-17 19:12:11 -04:00
trace regmap: introduce regmap_name to fix syscon regmap trace events 2015-04-16 20:11:29 -04:00
uapi USB: usbfs: allow URBs to be reaped after disconnection 2015-08-04 14:38:38 -04:00
video fbdev changes for 3.18 2014-10-18 18:03:02 -07:00
xen x86/xen: allow privcmd hypercalls to be preempted 2015-07-20 21:12:45 -04:00
Kbuild UAPI: remove empty Kbuild files 2013-04-30 17:04:09 -07:00