diff options
author | Emanuele Giuseppe Esposito <eesposit@redhat.com> | 2022-02-09 05:54:50 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2022-03-04 18:14:40 +0100 |
commit | a94750d9567359fb296161cd80afb015ef18193f (patch) | |
tree | 5b4bdd49bf704debe5b29a94aa1b0367de9ef47d /block | |
parent | dae84929e415fe46751a35067fd5e45c6ba459b4 (diff) |
block: introduce bdrv_activate
This function is currently just a wrapper for bdrv_invalidate_cache(),
but in future will contain the code of bdrv_co_invalidate_cache() that
has to always be protected by BQL, and leave the rest in the I/O
coroutine.
Replace all bdrv_invalidate_cache() invokations with bdrv_activate().
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220209105452.1694545-4-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/block-backend.c | 2 | ||||
-rw-r--r-- | block/export/export.c | 2 | ||||
-rw-r--r-- | block/parallels.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index 4ff6b4d785..c516113a36 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1889,7 +1889,7 @@ void blk_invalidate_cache(BlockBackend *blk, Error **errp) return; } - bdrv_invalidate_cache(bs, errp); + bdrv_activate(bs, errp); } bool blk_is_inserted(BlockBackend *blk) diff --git a/block/export/export.c b/block/export/export.c index 6d3b9964c8..7253af3bc3 100644 --- a/block/export/export.c +++ b/block/export/export.c @@ -139,7 +139,7 @@ BlockExport *blk_exp_add(BlockExportOptions *export, Error **errp) * access since the export could be available before migration handover. * ctx was acquired in the caller. */ - bdrv_invalidate_cache(bs, NULL); + bdrv_activate(bs, NULL); perm = BLK_PERM_CONSISTENT_READ; if (export->writable) { diff --git a/block/parallels.c b/block/parallels.c index 6ebad2a2bb..e58c828422 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -873,7 +873,7 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags, s->bat_dirty_bmap = bitmap_new(DIV_ROUND_UP(s->header_size, s->bat_dirty_block)); - /* Disable migration until bdrv_invalidate_cache method is added */ + /* Disable migration until bdrv_activate method is added */ error_setg(&s->migration_blocker, "The Parallels format used by node '%s' " "does not support live migration", bdrv_get_device_or_node_name(bs)); |