[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 15/33] include/sysemu/blockdev.h: global state API
From: |
Emanuele Giuseppe Esposito |
Subject: |
[PATCH v6 15/33] include/sysemu/blockdev.h: global state API |
Date: |
Fri, 21 Jan 2022 12:05:26 -0500 |
blockdev functions run always under the BQL lock.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
include/sysemu/blockdev.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index f9fb54d437..a420bbc630 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -13,9 +13,6 @@
#include "block/block.h"
#include "qemu/queue.h"
-void blockdev_mark_auto_del(BlockBackend *blk);
-void blockdev_auto_del(BlockBackend *blk);
-
typedef enum {
IF_DEFAULT = -1, /* for use with drive_add() only */
/*
@@ -38,6 +35,16 @@ struct DriveInfo {
QTAILQ_ENTRY(DriveInfo) next;
};
+/*
+ * Global state (GS) API. These functions run under the BQL lock.
+ *
+ * See include/block/block-global-state.h for more information about
+ * the GS API.
+ */
+
+void blockdev_mark_auto_del(BlockBackend *blk);
+void blockdev_auto_del(BlockBackend *blk);
+
DriveInfo *blk_legacy_dinfo(BlockBackend *blk);
DriveInfo *blk_set_legacy_dinfo(BlockBackend *blk, DriveInfo *dinfo);
BlockBackend *blk_by_legacy_dinfo(DriveInfo *dinfo);
--
2.31.1
- [PATCH v6 02/33] include/block/block: split header into I/O and global state API, (continued)
- [PATCH v6 02/33] include/block/block: split header into I/O and global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 16/33] assertions for blockdev.h global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 20/33] block: rename bdrv_invalidate_cache_all, blk_invalidate_cache and test_sync_op_invalidate_cache, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 13/33] include/block/blockjob.h: global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 12/33] block.c: add assertions to static functions, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 18/33] block/copy-before-write.h: global state API + assertions, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 15/33] include/sysemu/blockdev.h: global state API,
Emanuele Giuseppe Esposito <=
- [PATCH v6 14/33] assertions for blockjob.h global state API, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 30/33] include/block/block_int-common.h: introduce bdrv_amend_pre_run and bdrv_amend_clean, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 26/33] block_int-common.h: assertions in the callers of BdrvChildClass function pointers, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 19/33] block: introduce bdrv_activate, Emanuele Giuseppe Esposito, 2022/01/21
- [PATCH v6 21/33] block: move BQL logic of bdrv_co_invalidate_cache in bdrv_activate, Emanuele Giuseppe Esposito, 2022/01/21