]> git.proxmox.com Git - qemu.git/commit
block: call the snapshot handlers of the protocol drivers
authorMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Fri, 28 May 2010 02:44:58 +0000 (11:44 +0900)
committerKevin Wolf <kwolf@redhat.com>
Fri, 4 Jun 2010 09:43:40 +0000 (11:43 +0200)
commit7cdb1f6d305e1000b5f882257cbee71b8bb08ef5
treecf251eb11f8e7b719bbf2d1b867b564dd8422690
parent2bc93fed76c89f7adaa0e5bb357dcdc6c2b097a8
block: call the snapshot handlers of the protocol drivers

When snapshot handlers are not defined in the format driver, it is
better to call the ones of the protocol driver.  This enables us to
implement snapshot support in the protocol driver.

We need to call bdrv_close() and bdrv_open() handlers of the format
driver before and after bdrv_snapshot_goto() call of the protocol.  It is
because the contents of the block driver state may need to be changed
after loading vmstate.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c