diff options
author | David Disseldorp <ddiss@suse.de> | 2017-01-02 18:04:07 +0100 |
---|---|---|
committer | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-01-10 08:41:19 -0800 |
commit | 66640d35c1e4ef3c96ba5edb3c5e2ff8ab812e7a (patch) | |
tree | c48b6023cbcd4b0a8b31b8cacb2d96ebdc780837 /drivers/target/target_core_xcopy.h | |
parent | f184210bca6c9d0091ff5e5629dea4cbb8a17c0f (diff) |
target: use XCOPY segment descriptor CSCD IDs
The XCOPY specification in SPC4r37 states that the XCOPY source and
destination device(s) should be derived from the copy source and copy
destination (CSCD) descriptor IDs in the XCOPY segment descriptor.
The CSCD IDs are generally (for block -> block copies), indexes into
the corresponding CSCD descriptor list, e.g.
=================================
EXTENDED COPY Header
=================================
CSCD Descriptor List
- entry 0
+ LU ID <--------------<------------------\
- entry 1 |
+ LU ID <______________<_____________ |
================================= | |
Segment Descriptor List | |
- segment 0 | |
+ src CSCD ID = 0 --------->---------+----/
+ dest CSCD ID = 1 ___________>______|
+ len
+ src lba
+ dest lba
=================================
Currently LIO completely ignores the src and dest CSCD IDs in the
Segment Descriptor List, and instead assumes that the first entry in the
CSCD list corresponds to the source, and the second to the destination.
This commit removes this assumption, by ensuring that the Segment
Descriptor List is parsed prior to processing the CSCD Descriptor List.
CSCD Descriptor List processing is modified to compare the current list
index with the previously obtained src and dest CSCD IDs.
Additionally, XCOPY requests where the src and dest CSCD IDs refer to
the CSCD Descriptor List entry can now be successfully processed.
Fixes: cbf031f ("target: Add support for EXTENDED_COPY copy offload")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=191381
Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Diffstat (limited to 'drivers/target/target_core_xcopy.h')
0 files changed, 0 insertions, 0 deletions