Skip to content

Commit 09b13fa

Browse files
author
Nicholas Bellinger
committed
vhost/scsi: Add ANY_LAYOUT support in vhost_scsi_handle_vq
This patch adds ANY_LAYOUT compatible support within the existing vhost_scsi_handle_vq() ->handle_kick() callback. It calculates data_direction + exp_data_len for the new tcm_vhost_cmd descriptor by walking both outgoing + incoming iovecs using iov_iter, assuming the layout of outgoing request header + T10_PI + Data payload comes first. It also uses copy_from_iter() to copy leading virtio-scsi request header that may or may not include SCSI CDB, that returns a re-calculated iovec to start of T10_PI or Data SGL memory. Also, go ahead and drop the legacy pre virtio v1.0 !ANY_LAYOUT logic. Cc: Michael S. Tsirkin <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
1 parent e8de56b commit 09b13fa

File tree

1 file changed

+110
-196
lines changed

1 file changed

+110
-196
lines changed

0 commit comments

Comments
 (0)