Please enable JavaScript.
Coggle requires JavaScript to display documents.
qcow2 Meta update - Coggle Diagram
qcow2 Meta update
policy
cluster leak can be accepted
meta integrity has to be guaranteed
maximum write performance
problem
data write
check if there is mapping for this virt address
write in place if there is mapping
return after the write & discard is cone
build the mapping
build one l2 slice
build l2 slice from inflight if l1 entry is zero
write l1 table
allocate cluster for l2 table
build the specified l2 slice
load from image if l1 entry isn't zero
allocate one cluster and fill the l2 entry if l2 entry isn't valid
write l2 slice
need to discard other parts of the new cluster
track l1/reftable dirty
dirty unit
block size
entriy
clear dirty bits before flushing
avoid write lock when flushing table
data structure
Dequeue
l1 vs reftable
reftable is always sequential dirty
l1 is often random
flush in order
lock
cluster allocator
ensure_refblock_offset
hold reftable write lock
mark new cluster
add_cache_slice
flush_cache_entries
rb slice write lock
write
update l1 entries
hold l1 write
alloc clusters
mark new cluster
write lock
update l2 entries
hold l2 lock
alloc clusters
mark new cluster
write lock
flushing meta data
approach
softupdate
qcow2 meta is simple
easy to maintain order
how to?
when to flush meta?
delay or immediately