summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_xcopy.h
diff options
context:
space:
mode:
authorAnastasia Kovaleva <a.kovaleva@yadro.com>2022-11-14 13:25:00 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-11-24 02:16:19 +0000
commit689d94ec208cfdf95101d99319cb4bdc5f55774d (patch)
treecf7189709ee5338a1c81710fbc60e1e04babdcae /drivers/target/target_core_xcopy.h
parent9375031ee40b66c8fd2fc24d5fbea47b69f53de6 (diff)
downloadlinux-689d94ec208cfdf95101d99319cb4bdc5f55774d.tar.bz2
scsi: target: core: Change the way target_xcopy_do_work() sets restiction on max I/O
To determine how many blocks sends in one command, the minimum value is selected from the hw_max_sectors of both devices. In target_xcopy_do_work, hw_max_sectors are used as blocks, not sectors; it also ignores the fact that sectors can be of different sizes, for example 512 and 4096 bytes. Because of this, a number of blocks can be transmitted that the device will not be able to accept. Change the selection of max transmission size into bytes. Reviewed-by: Konstantin Shelekhin <k.shelekhin@yadro.com> Reviewed-by: Dmitriy Bogdanov <d.bogdanov@yadro.com> Signed-off-by: Anastasia Kovaleva <a.kovaleva@yadro.com> Link: https://lore.kernel.org/r/20221114102500.88892-4-a.kovaleva@yadro.com Reviewed-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_xcopy.h')
-rw-r--r--drivers/target/target_core_xcopy.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_xcopy.h b/drivers/target/target_core_xcopy.h
index e5f20005179a..0aad7dc65895 100644
--- a/drivers/target/target_core_xcopy.h
+++ b/drivers/target/target_core_xcopy.h
@@ -5,7 +5,7 @@
#define XCOPY_TARGET_DESC_LEN 32
#define XCOPY_SEGMENT_DESC_LEN 28
#define XCOPY_NAA_IEEE_REGEX_LEN 16
-#define XCOPY_MAX_SECTORS 4096
+#define XCOPY_MAX_BYTES 16777216 /* 16 MB */
/*
* SPC4r37 6.4.6.1