[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/21] block: Add blk_commit_all() and blk_invalidat
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH 11/21] block: Add blk_commit_all() and blk_invalidate_cache_all() |
Date: |
Mon, 26 Jan 2015 14:27:38 -0500 |
These functions will be changed to iterate through the BDS trees as
defined by the BlockBackends instead of the list of root BDS, therefore
prepare moving their code to the BlockBackend level.
Signed-off-by: Max Reitz <address@hidden>
---
block/block-backend.c | 10 ++++++++++
include/sysemu/block-backend.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c
index 3ff6679..27c9b99 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1233,3 +1233,13 @@ BlockBackendRootState *blk_get_root_state(BlockBackend
*blk)
{
return &blk->root_state;
}
+
+int blk_commit_all(void)
+{
+ return bdrv_commit_all();
+}
+
+void blk_invalidate_cache_all(Error **errp)
+{
+ bdrv_invalidate_cache_all(errp);
+}
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index e1645ae..73b26ad 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -127,7 +127,9 @@ int blk_co_discard(BlockBackend *blk, int64_t sector_num,
int nb_sectors);
int blk_co_flush(BlockBackend *blk);
int blk_flush(BlockBackend *blk);
int blk_flush_all(void);
+int blk_commit_all(void);
void blk_drain_all(void);
+void blk_invalidate_cache_all(Error **errp);
void blk_set_on_error(BlockBackend *blk, BlockdevOnError on_read_error,
BlockdevOnError on_write_error);
BlockdevOnError blk_get_on_error(BlockBackend *blk, bool is_read);
--
2.1.0
- Re: [Qemu-devel] [PATCH 10/21] block: Add blk_next_inserted(), (continued)
- [Qemu-devel] [PATCH 02/21] quorum: Fix close path, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 14/21] blockdev: Remove blk_hide_on_behalf_of_do_drive_del(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 16/21] block: Move some bdrv_*_all() functions to BB, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 12/21] block: Use BlockBackend more, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 15/21] block: Make bdrv_drain_one() public, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 11/21] block: Add blk_commit_all() and blk_invalidate_cache_all(),
Max Reitz <=
- [Qemu-devel] [PATCH 17/21] block: Remove bdrv_states, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 13/21] blockdev: Add list of monitor-owned BlockBackends, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 19/21] block: Strip down bdrv_close_all(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 18/21] blockdev: Keep track of monitor-owned BDS, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 20/21] iotests: Add "wait" functionality to _cleanup_qemu, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 21/21] iotests: Add test for multiple BB on BDS tree, Max Reitz, 2015/01/26
- Re: [Qemu-devel] [PATCH 00/20] block: Rework bdrv_close_all(), Max Reitz, 2015/01/26