[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 5/8] block: add a few more notes on locking
From: |
Emanuele Giuseppe Esposito |
Subject: |
[PATCH v2 5/8] block: add a few more notes on locking |
Date: |
Mon, 19 Apr 2021 10:55:38 +0200 |
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
include/block/block_int.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index a1aad5ad2d..67a0777e12 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -154,7 +154,9 @@ struct BlockDriver {
*/
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);
@@ -168,6 +170,7 @@ struct BlockDriver {
/* Protocol drivers should implement this instead of bdrv_open */
int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags,
Error **errp);
+ /* Called from main thread. */
void (*bdrv_close)(BlockDriverState *bs);
--
2.30.2
- [PATCH v2 0/8] Block layer thread-safety, continued, Emanuele Giuseppe Esposito, 2021/04/19
- [PATCH v2 1/8] block: prepare write threshold code for thread safety, Emanuele Giuseppe Esposito, 2021/04/19
- [PATCH v2 2/8] block: protect write threshold QMP commands from concurrent requests, Emanuele Giuseppe Esposito, 2021/04/19
- [PATCH v2 3/8] util: use RCU accessors for notifiers, Emanuele Giuseppe Esposito, 2021/04/19
- [PATCH v2 4/8] block: make before-write notifiers thread-safe, Emanuele Giuseppe Esposito, 2021/04/19
- [PATCH v2 5/8] block: add a few more notes on locking,
Emanuele Giuseppe Esposito <=
- [PATCH v2 6/8] block: do not acquire AioContext in check_to_replace_node, Emanuele Giuseppe Esposito, 2021/04/19
- [PATCH v2 7/8] block/replication: do not acquire AioContext, Emanuele Giuseppe Esposito, 2021/04/19
- [PATCH v2 8/8] block: do not take AioContext around reopen, Emanuele Giuseppe Esposito, 2021/04/19
- Re: [PATCH v2 0/8] Block layer thread-safety, continued, Paolo Bonzini, 2021/04/21