[pve-devel] [PATCH v3 qemu-server 08/11] blockdev: convert drive_mirror to blockdev_mirror

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Mon Jan 13 11:47:58 CET 2025


>>something like this was what I was afraid of ;) this basically means
>>we need to have some way to lookup the nodes based on the structure
>>of the graph, which probably also means verifying that the structure
>>matches the expected one (e.g., if we have X snapshots, we expect N
>>nodes, if we currently have operation A going on, there should be an
>>extra node, etc.pp. - and then we can "know" that the seventh node
>>from the bottom must be snapshot 'foobar' ;)). 

I think it's not a much a problem to follow the graph from top to
bottom. (as everything attached is have parent-child relationship)
and

- for snapshot, we have the snapshot name in the filename
So we can known if it' a specific snap or the live image.


for the temporary nodes (when we do block-add, before a mirror or
switch), we define the nodename, so we don't need to parse the graph
here.



>>relying on $path being >>stable definitely won't work.

I really don't see why the path couldn't be stable ?

Over time, if something is changing in qemu (for example, rbd://....
with a new param),
it'll only be apply on the new qemu process (after restart or live
migration), so the path in the block-node will be updated too. (live
migration will not keep old block-nodes infos, the used value are qemu
command line arguments)


and the file path is the only attribute in a node that you can't
update.







More information about the pve-devel mailing list