diff options
author | Fam Zheng <famz@redhat.com> | 2015-11-09 18:16:52 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-11-12 16:22:43 +0100 |
commit | 83c98d7b924eab36a0a2c7813731dbef439a91d3 (patch) | |
tree | 45ba929b675a6baf7612bd634c634cde5eb90b27 /block/iscsi.c | |
parent | 5c5ae76acb024f05b8f021e9f1e10a0299328bdd (diff) |
block: Drop BlockDriver.bdrv_ioctl
Now the callback is not used any more, drop the field along with all
implementations in block drivers, which are iscsi and raw.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1447064214-29930-8-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r-- | block/iscsi.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index 46290e0c43..bd1f1bfcd1 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -898,38 +898,6 @@ static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, return &acb->common; } -static void ioctl_cb(void *opaque, int status) -{ - int *p_status = opaque; - *p_status = status; -} - -static int iscsi_ioctl(BlockDriverState *bs, unsigned long int req, void *buf) -{ - IscsiLun *iscsilun = bs->opaque; - int status; - - switch (req) { - case SG_GET_VERSION_NUM: - *(int *)buf = 30000; - break; - case SG_GET_SCSI_ID: - ((struct sg_scsi_id *)buf)->scsi_type = iscsilun->type; - break; - case SG_IO: - status = -EINPROGRESS; - iscsi_aio_ioctl(bs, req, buf, ioctl_cb, &status); - - while (status == -EINPROGRESS) { - aio_poll(iscsilun->aio_context, true); - } - - return 0; - default: - return -1; - } - return 0; -} #endif static int64_t @@ -1860,7 +1828,6 @@ static BlockDriver bdrv_iscsi = { .bdrv_co_flush_to_disk = iscsi_co_flush, #ifdef __linux__ - .bdrv_ioctl = iscsi_ioctl, .bdrv_aio_ioctl = iscsi_aio_ioctl, #endif |