diff options
Diffstat (limited to 'block/snapshot.c')
-rw-r--r-- | block/snapshot.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/block/snapshot.c b/block/snapshot.c index 75d0b968f6..6e9fa8da98 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -469,3 +469,18 @@ int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn, *first_bad_bs = bs; return err; } + +BlockDriverState *bdrv_all_find_vmstate_bs(void) +{ + bool not_found = true; + BlockDriverState *bs = NULL; + + while (not_found && (bs = bdrv_next(bs))) { + AioContext *ctx = bdrv_get_aio_context(bs); + + aio_context_acquire(ctx); + not_found = !bdrv_can_snapshot(bs); + aio_context_release(ctx); + } + return bs; +} |