virtio-blk: Pass req to virtio_blk_handle_scsi_req
In preparation for calling blk_aio_ioctl. Also make the function static as no other files need it. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
c6441452b5
commit
75344fa4c5
@ -127,12 +127,13 @@ static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s)
|
|||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
int virtio_blk_handle_scsi_req(VirtIOBlock *blk,
|
static int virtio_blk_handle_scsi_req(VirtIOBlockReq *req)
|
||||||
VirtQueueElement *elem)
|
|
||||||
{
|
{
|
||||||
int status = VIRTIO_BLK_S_OK;
|
int status = VIRTIO_BLK_S_OK;
|
||||||
struct virtio_scsi_inhdr *scsi = NULL;
|
struct virtio_scsi_inhdr *scsi = NULL;
|
||||||
VirtIODevice *vdev = VIRTIO_DEVICE(blk);
|
VirtIODevice *vdev = VIRTIO_DEVICE(req->dev);
|
||||||
|
VirtQueueElement *elem = &req->elem;
|
||||||
|
VirtIOBlock *blk = req->dev;
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
int i;
|
int i;
|
||||||
@ -252,7 +253,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
status = virtio_blk_handle_scsi_req(req->dev, &req->elem);
|
status = virtio_blk_handle_scsi_req(req);
|
||||||
virtio_blk_req_complete(req, status);
|
virtio_blk_req_complete(req, status);
|
||||||
virtio_blk_free_request(req);
|
virtio_blk_free_request(req);
|
||||||
}
|
}
|
||||||
|
@ -153,9 +153,6 @@ VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s);
|
|||||||
|
|
||||||
void virtio_blk_free_request(VirtIOBlockReq *req);
|
void virtio_blk_free_request(VirtIOBlockReq *req);
|
||||||
|
|
||||||
int virtio_blk_handle_scsi_req(VirtIOBlock *blk,
|
|
||||||
VirtQueueElement *elem);
|
|
||||||
|
|
||||||
void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb);
|
void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb);
|
||||||
|
|
||||||
void virtio_submit_multiwrite(BlockBackend *blk, MultiReqBuffer *mrb);
|
void virtio_submit_multiwrite(BlockBackend *blk, MultiReqBuffer *mrb);
|
||||||
|
Loading…
Reference in New Issue
Block a user