]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools, qcow: Delayed L2 table writeout
authorPekka Enberg <penberg@kernel.org>
Sat, 9 Jul 2011 07:58:37 +0000 (10:58 +0300)
committerPekka Enberg <penberg@kernel.org>
Sun, 10 Jul 2011 12:23:23 +0000 (15:23 +0300)
commit4a69b1c93fcd595ed040c2e2ed69d265a88f0de3
tree019c52709d919ce28a9c92d8eb153bcdc20e1fcd
parentaf1e1e3ea46503e9472f9974c2c786de9c02fd7c
kvm tools, qcow: Delayed L2 table writeout

This patch delays writeout for new L2 tables like we do for L1 tables. If a L2
table has non-allocated clusters, we mark that in the in-memory L2 table but
don't actually write it to disk until the L2 table is thrown out of LRU cache
or when qcow_disk_flush() is called. That makes writes to new clusters volatile
before VIRTIO_BLK_T_FLUSH is issued without corrupting the QCOW image on I/O
error.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/disk/qcow.c