summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_xcopy.h
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2020-03-27 15:19:52 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-29 18:10:59 -0400
commit0ad08996da05b6b735d4963dceab7d2a4043607c (patch)
treed8c812da2732e13429e491c779e0f82a9a97e847 /drivers/target/target_core_xcopy.h
parent267fc83f8836ad6168ed264a0823543439abb3be (diff)
scsi: target: avoid per-loop XCOPY buffer allocations
The main target_xcopy_do_work() loop unnecessarily allocates an I/O buffer with each synchronous READ / WRITE pair. This commit significantly reduces allocations by reusing the XCOPY I/O buffer when possible. Link: https://lore.kernel.org/r/20200327141954.955-4-ddiss@suse.de Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Disseldorp <ddiss@suse.de> 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/target/target_core_xcopy.h b/drivers/target/target_core_xcopy.h
index 0840b03e8faa..9558974185ea 100644
--- a/drivers/target/target_core_xcopy.h
+++ b/drivers/target/target_core_xcopy.h
@@ -39,6 +39,7 @@ struct xcopy_op {
struct xcopy_pt_cmd *src_pt_cmd;
struct xcopy_pt_cmd *dst_pt_cmd;
+ u32 xop_data_bytes;
u32 xop_data_nents;
struct scatterlist *xop_data_sg;
struct work_struct xop_work;