diff mbox

[06/11] block: add a few more notes on locking

Message ID 20170706163828.24082-7-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini July 6, 2017, 4:38 p.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/block/block_int.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Stefan Hajnoczi July 10, 2017, 3:57 p.m. UTC | #1
On Thu, Jul 06, 2017 at 06:38:23PM +0200, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  include/block/block_int.h | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox

Patch

diff --git a/include/block/block_int.h b/include/block/block_int.h
index 173d9dcaf9..43c9f4fcae 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -114,7 +114,9 @@  struct BlockDriver {
     /* Set if a driver can support backing files */
     bool supports_backing;
 
-    /* For handling image reopen for split or non-split files */
+    /* For handling image reopen for split or non-split files.  Called
+     * with no I/O pending.
+    */
     int (*bdrv_reopen_prepare)(BDRVReopenState *reopen_state,
                                BlockReopenQueue *queue, Error **errp);
     void (*bdrv_reopen_commit)(BDRVReopenState *reopen_state);
@@ -125,11 +127,13 @@  struct BlockDriver {
                      Error **errp);
     int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags,
                           Error **errp);
-    void (*bdrv_close)(BlockDriverState *bs);
     int (*bdrv_create)(const char *filename, QemuOpts *opts, Error **errp);
-    int (*bdrv_set_key)(BlockDriverState *bs, const char *key);
     int (*bdrv_make_empty)(BlockDriverState *bs);
 
+    /* Called from main thread.  */
+    void (*bdrv_close)(BlockDriverState *bs);
+    int (*bdrv_set_key)(BlockDriverState *bs, const char *key);
+
     void (*bdrv_refresh_filename)(BlockDriverState *bs, QDict *options);
 
     /* aio */