OSDN Git Service

qcow2: Fix L1 write error handling in qcow2_update_snapshot_refcount
authorKevin Wolf <kwolf@redhat.com>
Fri, 5 Apr 2013 10:57:10 +0000 (12:57 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 5 Apr 2013 16:58:05 +0000 (18:58 +0200)
commitc2b6ff51e4a3ad1f7ec5dbc94970e9778b31d718
treeabd4ac0474e0cf937963e0cd06ce0ecf9915b0bf
parentc2bc78b6a975ea2dcd7eee9f0dce22cc060cdcdc
qcow2: Fix L1 write error handling in qcow2_update_snapshot_refcount

It ignored the error code, and at least the 'goto fail' is obvious
nonsense as it creates an endless loop (if the next attempt doesn't
magically succeed) and leaves the in-memory L1 table in big-endian
instead of converting it back.

In error cases, there's no point in writing an updated L1 table, so
skip this part for them.

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