diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-12 19:57:12 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-12 19:57:12 +0000 |
commit | 22a74521589aefe96e0d01e07ecb49f9862b62f1 (patch) | |
tree | 46b648594c2e0c1db08685d4396e373b8d53cc87 /block_int.h | |
parent | 3ae1852b9102f1dc3fa58037c8fbad819547afe5 (diff) | |
download | qemu-22a74521589aefe96e0d01e07ecb49f9862b62f1.tar.gz qemu-22a74521589aefe96e0d01e07ecb49f9862b62f1.tar.bz2 qemu-22a74521589aefe96e0d01e07ecb49f9862b62f1.zip |
Add internal scsi generic block API (Avi Kivity)
Add an internal API for the generic block layer to send scsi generic commands
to block format driver. This means block format drivers no longer need
to consider overloaded nb_sectors parameters.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6823 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block_int.h')
-rw-r--r-- | block_int.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h index 44eb280684..e274293a19 100644 --- a/block_int.h +++ b/block_int.h @@ -84,6 +84,16 @@ struct BlockDriver { /* to control generic scsi devices */ int (*bdrv_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf); + int (*bdrv_sg_send_command)(BlockDriverState *bs, void *buf, int count); + int (*bdrv_sg_recv_response)(BlockDriverState *bs, void *buf, int count); + BlockDriverAIOCB *(*bdrv_sg_aio_read)(BlockDriverState *bs, + void *buf, int count, + BlockDriverCompletionFunc *cb, + void *opaque); + BlockDriverAIOCB *(*bdrv_sg_aio_write)(BlockDriverState *bs, + void *buf, int count, + BlockDriverCompletionFunc *cb, + void *opaque); BlockDriverAIOCB *free_aiocb; struct BlockDriver *next; |