On Thu, Jan 18, 2018 at 17:04:34 +0100, Michal Privoznik wrote:
Couple of reasons for that:
a) there's no monitor command to change path where the pr-helper
connects to, or
b) there's no monitor command to introduce a new pr-helper for a
disk that already exists.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/qemu/qemu_domain.c | 8 ++++++++
src/util/virstoragefile.c | 18 ++++++++++++++++++
src/util/virstoragefile.h | 2 ++
4 files changed, 29 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index b0dc76b91..424f2ef64 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2719,6 +2719,7 @@ virStorageNetHostTransportTypeToString;
virStorageNetProtocolTypeToString;
virStoragePRDefFormat;
virStoragePRDefFree;
+virStoragePRDefIsEqual;
virStoragePRDefParseNode;
virStorageSourceBackingStoreClear;
virStorageSourceClear;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 441bf5935..e8539dcab 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6865,6 +6865,14 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
CHECK_EQ(src->readonly, "readonly", true);
CHECK_EQ(src->shared, "shared", true);
+ if (!virStoragePRDefIsEqual(disk->src->pr,
+ orig_disk->src->pr)) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+ _("cannot modify field '%s' of the disk"),
+ "reservations");
Is there a particular reason to format 'reservations' separately?
Translations should not translate it, but doing this is generally deemed
translation unfriendly.
Rest looks good to me.