]> git.proxmox.com Git - qemu.git/commit - blockdev.c
Improve error handling in do_snapshot_blkdev()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Mar 2011 10:20:30 +0000 (11:20 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 15 Mar 2011 12:21:14 +0000 (13:21 +0100)
commit52f9a172b6db89ba1f4389883be805d65dd3ca8c
tree2ea0699ee2730492ec145bf681d8c75bcafe3ee4
parentb93af93d2bbacf034af1888c96291850aa849b59
Improve error handling in do_snapshot_blkdev()

In case we cannot open the newly created snapshot image, try to fall
back to the original image file and continue running on that, which
should prevent the guest from aborting.

This is a corner case which can happen if the admin by mistake
specifies the snapshot file on a virtual file system which does not
support O_DIRECT. bdrv_create() does not use O_DIRECT, but the
following open in bdrv_open() does and will then fail.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev.c