qcow2: Return real error in qcow2_update_snapshot_refcount
commitc2bc78b6a975ea2dcd7eee9f0dce22cc060cdcdc
authorKevin Wolf <kwolf@redhat.com>
Fri, 5 Apr 2013 10:51:31 +0000 (5 12:51 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 5 Apr 2013 16:58:05 +0000 (5 18:58 +0200)
treea10866bea88e6ff9f393c4364cb09ad2598c2e84
parent0775437fafc5c733564645a22f75490770bf41f7
qcow2: Return real error in qcow2_update_snapshot_refcount

This fixes the error message triggered by the following script:

    cat > /tmp/blkdebug.cfg <<EOF
    [inject-error]
    event = "cluster_free"
    errno = "28"
    immediately = "off"
    EOF

    $qemu_img create -f qcow2 test.qcow2 10G
    $qemu_img snapshot -c snap test.qcow2
    $qemu_img snapshot -d snap blkdebug:/tmp/blkdebug.cfg:test.qcow2

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c