[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 06/11] block: add a few more notes on locking
From: |
Paolo Bonzini |
Subject: |
[Qemu-block] [PATCH 06/11] block: add a few more notes on locking |
Date: |
Thu, 6 Jul 2017 18:38:23 +0200 |
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/block/block_int.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
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 */
--
2.13.0
- Re: [Qemu-block] [PATCH 01/11] block: prepare write threshold code for thread safety, (continued)
[Qemu-block] [PATCH 03/11] util: use RCU accessors for notifiers, Paolo Bonzini, 2017/07/06
[Qemu-block] [PATCH 05/11] block-backup: add reqs_lock, Paolo Bonzini, 2017/07/06
[Qemu-block] [PATCH 04/11] block: make before-write notifiers thread-safe, Paolo Bonzini, 2017/07/06
[Qemu-block] [PATCH 06/11] block: add a few more notes on locking,
Paolo Bonzini <=
[Qemu-block] [PATCH 07/11] block: do not acquire AioContext in check_to_replace_node, Paolo Bonzini, 2017/07/06
[Qemu-block] [PATCH 09/11] block/replication: do not acquire AioContext, Paolo Bonzini, 2017/07/06
[Qemu-block] [PATCH 08/11] block: drain I/O around key management, Paolo Bonzini, 2017/07/06
[Qemu-block] [PATCH 10/11] block: do not take AioContext around reopen, Paolo Bonzini, 2017/07/06
[Qemu-block] [PATCH 11/11] block/snapshot: do not take AioContext lock, Paolo Bonzini, 2017/07/06