[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/11] block: Add notes to iSCSI's .bdrv_open and .bd
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 03/11] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare |
Date: |
Fri, 14 Feb 2014 18:29:25 +0100 |
From: Jeff Cody <address@hidden>
iSCSI currently does not need to do any actions to support the
current usage of bdrv_reopen(). However, it is important to note
a couple of things: 1.) A connection will not be re-established to
an iSCSI target, and 2.) If iscsi_open() is changed to parse 'flags',
then iscsi_reopen_prepare() may need to be more than a stub.
In light of the above, this commit adds comments above both of the
functions to bring attention to these facts.
Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/iscsi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 8d0f966..c97c040 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1099,6 +1099,10 @@ fail:
/*
* We support iscsi url's on the form
* iscsi://[<username>%<password>@]<host>[:<port>]/<targetname>/<lun>
+ *
+ * Note: flags are currently not used by iscsi_open. If this function
+ * is changed such that flags are used, please examine iscsi_reopen_prepare()
+ * to see if needs to be changed as well.
*/
static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
@@ -1336,11 +1340,13 @@ static int iscsi_refresh_limits(BlockDriverState *bs)
return 0;
}
-/* We have nothing to do for iSCSI reopen, stub just returns
- * success */
+/* Since iscsi_open() ignores bdrv_flags, there is nothing to do here in
+ * prepare. Note that this will not re-establish a connection with an iSCSI
+ * target - it is effectively a NOP. */
static int iscsi_reopen_prepare(BDRVReopenState *state,
BlockReopenQueue *queue, Error **errp)
{
+ /* NOP */
return 0;
}
--
1.8.5.3
- [Qemu-devel] [PULL 00/11] Block patches, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 01/11] sdhci: Drop unnecessary #include, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 03/11] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 02/11] blockdev: Remove 'type' parameter from blockdev_init(), Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 04/11] block: Don't throw away errno via error_setg, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 05/11] block: qemu-iotests - fix test 070 (vhdx), Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 07/11] qemu-iotests: Don't run 005 on vmdk split formats, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 06/11] block: qemu-iotests - add vhdx log replay tests for qemu-img, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 09/11] blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close., Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 08/11] block: mirror - use local_err to avoid NULL errp, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 11/11] block: Open by reference will try device then node_name., Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 10/11] block: Relax bdrv_lookup_bs constraints., Stefan Hajnoczi, 2014/02/14
- Re: [Qemu-devel] [PULL 00/11] Block patches, Peter Maydell, 2014/02/15