The node name and backing file name can be inferred from the hierarchy.
This will also help when converting to detect node names using
query-blockstats data.
Reviewed-by: Eric Blake <eblake@redhat.com>
filename : '/var/lib/libvirt/images/rhel7.3.1483545313'
format node : '#block118'
storage node: '#block078'
-backingfile : '/var/lib/libvirt/images/rhel7.3.1483536402'
-backing ptr : '#block331'
filename : '/var/lib/libvirt/images/rhel7.3.1483536402'
format node : '#block331'
storage node: '#block281'
- backingfile : '/var/lib/libvirt/images/rhel7.3.qcow2'
- backing ptr : '#block567'
filename : '/var/lib/libvirt/images/rhel7.3.qcow2'
format node : '#block567'
storage node: '#block424'
- backingfile : '<null>'
- backing ptr : '<null>'
filename : 'gluster://gluster-host/vol0/img1'
format node : '#block1008'
storage node: '#block981'
-backingfile : 'gluster://gluster-host/vol0/img0'
-backing ptr : '#block349'
filename : 'gluster://gluster-host/vol0/img0'
format node : '#block349'
storage node: '#block269'
- backingfile : '<null>'
- backing ptr : '<null>'
filename : '/var/lib/libvirt/images/img3'
format node : '#block153'
storage node: '#block076'
-backingfile : '/var/lib/libvirt/images/img2'
-backing ptr : '#block357'
filename : '/var/lib/libvirt/images/img2'
format node : '#block357'
storage node: '#block290'
- backingfile : '/var/lib/libvirt/images/img1'
- backing ptr : '#block514'
filename : '/var/lib/libvirt/images/img1'
format node : '#block514'
storage node: '#block481'
- backingfile : '/var/lib/libvirt/images/img0'
- backing ptr : '#block709'
filename : '/var/lib/libvirt/images/img0'
format node : '#block709'
storage node: '#block665'
- backingfile : '<null>'
- backing ptr : '<null>'
filename : '/var/lib/libvirt/images/relsnap.qcow2'
format node : '#block1177'
storage node: '#block1027'
-backingfile : '/var/lib/libvirt/images/base.qcow2'
-backing ptr : '#block957'
filename : '/var/lib/libvirt/images/base.qcow2'
format node : '#block957'
storage node: '#block840'
- backingfile : '<null>'
- backing ptr : '<null>'
filename : '/var/lib/libvirt/images/a.qcow2'
format node : '#block170'
storage node: '#block057'
-backingfile : '/var/lib/libvirt/images/base.qcow2'
-backing ptr : '<null>'
filename : '/var/lib/libvirt/images/b.qcow2'
format node : '#block574'
storage node: '#block405'
-backingfile : '/var/lib/libvirt/images/base.qcow2'
-backing ptr : '<null>'
NULLSTR(entry->nodeformat));
virBufferAsprintf(buf, "storage node: '%s'\n",
NULLSTR(entry->nodestorage));
- virBufferAsprintf(buf, "backingfile : '%s'\n",
- NULLSTR(entry->backingstore));
- virBufferAsprintf(buf, "backing ptr : '%s'\n",
- NULLSTR(entry->nodebacking));
virBufferAdjustIndent(buf, 2);