]> git.proxmox.com Git - qemu.git/commit
qcow2: flush refcount cache correctly in alloc_refcount_block()
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 4 Mar 2013 14:02:30 +0000 (15:02 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 15 Mar 2013 15:07:49 +0000 (16:07 +0100)
commit9991923b262dc35f6dd8393ab4853edd7fc3724f
tree1f5682543ab259a5cb9b4a8ef270076c48e1970e
parent74c4510a3cf7c369ee524c6f8fa8a87cf08ba608
qcow2: flush refcount cache correctly in alloc_refcount_block()

update_refcount() affects the refcount cache, it does not write to disk.
Therefore bdrv_flush(bs->file) does nothing.  We need to flush the
refcount cache in order to write out the refcount updates!

While we're here also add error returns when qcow2_cache_flush() fails.

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