Lines Matching refs:tv_cmd
318 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd() local
320 struct se_session *se_sess = tv_cmd->tvc_nexus->tvn_se_sess; in vhost_scsi_release_cmd()
323 if (tv_cmd->tvc_sgl_count) { in vhost_scsi_release_cmd()
324 for (i = 0; i < tv_cmd->tvc_sgl_count; i++) in vhost_scsi_release_cmd()
325 put_page(sg_page(&tv_cmd->tvc_sgl[i])); in vhost_scsi_release_cmd()
327 if (tv_cmd->tvc_prot_sgl_count) { in vhost_scsi_release_cmd()
328 for (i = 0; i < tv_cmd->tvc_prot_sgl_count; i++) in vhost_scsi_release_cmd()
329 put_page(sg_page(&tv_cmd->tvc_prot_sgl[i])); in vhost_scsi_release_cmd()
332 vhost_scsi_put_inflight(tv_cmd->inflight); in vhost_scsi_release_cmd()
1670 struct vhost_scsi_cmd *tv_cmd; in vhost_scsi_free_cmd_map_res() local
1677 tv_cmd = &((struct vhost_scsi_cmd *)se_sess->sess_cmd_map)[i]; in vhost_scsi_free_cmd_map_res()
1679 kfree(tv_cmd->tvc_sgl); in vhost_scsi_free_cmd_map_res()
1680 kfree(tv_cmd->tvc_prot_sgl); in vhost_scsi_free_cmd_map_res()
1681 kfree(tv_cmd->tvc_upages); in vhost_scsi_free_cmd_map_res()
1730 struct vhost_scsi_cmd *tv_cmd; in vhost_scsi_make_nexus() local
1762 tv_cmd = &((struct vhost_scsi_cmd *)se_sess->sess_cmd_map)[i]; in vhost_scsi_make_nexus()
1764 tv_cmd->tvc_sgl = kzalloc(sizeof(struct scatterlist) * in vhost_scsi_make_nexus()
1766 if (!tv_cmd->tvc_sgl) { in vhost_scsi_make_nexus()
1772 tv_cmd->tvc_upages = kzalloc(sizeof(struct page *) * in vhost_scsi_make_nexus()
1774 if (!tv_cmd->tvc_upages) { in vhost_scsi_make_nexus()
1780 tv_cmd->tvc_prot_sgl = kzalloc(sizeof(struct scatterlist) * in vhost_scsi_make_nexus()
1782 if (!tv_cmd->tvc_prot_sgl) { in vhost_scsi_make_nexus()