mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
vhost-scsi: Rename vhost_scsi_iov_to_sgl
Rename vhost_scsi_iov_to_sgl to vhost_scsi_map_iov_to_sgl so it matches matches the naming style used for vhost_scsi_copy_iov_to_sgl. Signed-off-by: Mike Christie <michael.christie@oracle.com> Message-Id: <20230709202859.138387-3-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
5ced58bfa1
commit
c5ace19efb
@ -780,7 +780,7 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vhost_scsi_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
|
vhost_scsi_map_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
|
||||||
struct scatterlist *sg, int sg_count, bool is_prot)
|
struct scatterlist *sg, int sg_count, bool is_prot)
|
||||||
{
|
{
|
||||||
struct scatterlist *p = sg;
|
struct scatterlist *p = sg;
|
||||||
@ -829,7 +829,8 @@ vhost_scsi_mapal(struct vhost_scsi_cmd *cmd,
|
|||||||
pr_debug("%s prot_sg %p prot_sgl_count %u\n", __func__,
|
pr_debug("%s prot_sg %p prot_sgl_count %u\n", __func__,
|
||||||
cmd->tvc_prot_sgl, cmd->tvc_prot_sgl_count);
|
cmd->tvc_prot_sgl, cmd->tvc_prot_sgl_count);
|
||||||
|
|
||||||
ret = vhost_scsi_iov_to_sgl(cmd, prot_iter, cmd->tvc_prot_sgl,
|
ret = vhost_scsi_map_iov_to_sgl(cmd, prot_iter,
|
||||||
|
cmd->tvc_prot_sgl,
|
||||||
cmd->tvc_prot_sgl_count, true);
|
cmd->tvc_prot_sgl_count, true);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
cmd->tvc_prot_sgl_count = 0;
|
cmd->tvc_prot_sgl_count = 0;
|
||||||
@ -846,7 +847,7 @@ vhost_scsi_mapal(struct vhost_scsi_cmd *cmd,
|
|||||||
pr_debug("%s data_sg %p data_sgl_count %u\n", __func__,
|
pr_debug("%s data_sg %p data_sgl_count %u\n", __func__,
|
||||||
cmd->tvc_sgl, cmd->tvc_sgl_count);
|
cmd->tvc_sgl, cmd->tvc_sgl_count);
|
||||||
|
|
||||||
ret = vhost_scsi_iov_to_sgl(cmd, data_iter, cmd->tvc_sgl,
|
ret = vhost_scsi_map_iov_to_sgl(cmd, data_iter, cmd->tvc_sgl,
|
||||||
cmd->tvc_sgl_count, false);
|
cmd->tvc_sgl_count, false);
|
||||||
if (ret == -EINVAL) {
|
if (ret == -EINVAL) {
|
||||||
sg_init_table(cmd->tvc_sgl, cmd->tvc_sgl_count);
|
sg_init_table(cmd->tvc_sgl, cmd->tvc_sgl_count);
|
||||||
|
Loading…
Reference in New Issue
Block a user