[libvirt] [PATCHv3 09/10] qemu, storage: improve type safety