]> xenbits.xensource.com Git - libvirt.git/commit
qemu: block: Add code to allow detection of auto-allocated node names
authorPeter Krempa <pkrempa@redhat.com>
Mon, 13 Mar 2017 11:46:18 +0000 (12:46 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Mar 2017 08:35:19 +0000 (10:35 +0200)
commitdbad8f8aee564809c16ebe68e713c4dbccf692e7
treeb5c072745f1ba43f722f8f9fa304955192d1601c
parentd92d7f6b52dc5126d19239e4ebf6f84d6b8964f1
qemu: block: Add code to allow detection of auto-allocated node names

qemu for some time already sets node names automatically for the block
nodes. This patch adds code that attempts a best-effort detection of the
node names for the backing chain from the output of
'query-named-block-nodes'. The only drawback is that the data provided
by qemu needs to be matched by the filename as seen by qemu and thus
if two disks share a single backing store file the detection won't work.

This will allow us to use qemu commands such as
'block-set-write-threshold' which only accepts node names.

In this patch only the detection code is added, it will be used later.
src/Makefile.am
src/qemu/qemu_block.c [new file with mode: 0644]
src/qemu/qemu_block.h [new file with mode: 0644]