aboutsummaryrefslogtreecommitdiff
path: root/block/iscsi.c
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2014-01-14 13:10:24 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2014-01-15 10:44:52 +0100
commitdc6afb99b39a78cf416c6d19e35f680f202016be (patch)
treea2cdb89ccfe2df072fe61600e3ae2c26c39b5763 /block/iscsi.c
parent49fb65c7f985baa56d2964e0a85c1f098e3e2a9d (diff)
block: add .bdrv_reopen_prepare() stub for iscsi
To suppport reopen(), the .bdrv_reopen_prepare() stub must exist. iSCSI does not have anything that needs to be done to support reopen, so we can just implement the _prepare() stub. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r--block/iscsi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index c0ea0c4543..5976bd14da 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1326,6 +1326,14 @@ static void iscsi_close(BlockDriverState *bs)
memset(iscsilun, 0, sizeof(IscsiLun));
}
+/* We have nothing to do for iSCSI reopen, stub just returns
+ * success */
+static int iscsi_reopen_prepare(BDRVReopenState *state,
+ BlockReopenQueue *queue, Error **errp)
+{
+ return 0;
+}
+
static int iscsi_truncate(BlockDriverState *bs, int64_t offset)
{
IscsiLun *iscsilun = bs->opaque;
@@ -1434,6 +1442,7 @@ static BlockDriver bdrv_iscsi = {
.bdrv_close = iscsi_close,
.bdrv_create = iscsi_create,
.create_options = iscsi_create_options,
+ .bdrv_reopen_prepare = iscsi_reopen_prepare,
.bdrv_getlength = iscsi_getlength,
.bdrv_get_info = iscsi_get_info,