* [Qemu-devel] [PATCH] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare
@ 2014-02-04 19:12 Jeff Cody
2014-02-14 12:38 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Cody @ 2014-02-04 19:12 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, stefanha
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 <jcody@redhat.com>
---
block/iscsi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 6f4af72..cb0ac69 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)
@@ -1337,11 +1341,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.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare
2014-02-04 19:12 [Qemu-devel] [PATCH] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare Jeff Cody
@ 2014-02-14 12:38 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2014-02-14 12:38 UTC (permalink / raw)
To: Jeff Cody; +Cc: kwolf, qemu-devel, stefanha
On Tue, Feb 04, 2014 at 02:12:44PM -0500, Jeff Cody wrote:
> 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 <jcody@redhat.com>
> ---
> block/iscsi.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-14 12:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04 19:12 [Qemu-devel] [PATCH] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare Jeff Cody
2014-02-14 12:38 ` Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.