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@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
virStorageNetProtocolTypeToString;
virStoragePRDefFormat;
virStoragePRDefFree;
+virStoragePRDefIsEqual;
virStoragePRDefParseXML;
virStorageSourceBackingStoreClear;
virStorageSourceClear;
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");
+ return false;
+ }
+
#undef CHECK_EQ
return true;
}
+bool
+virStoragePRDefIsEqual(virStoragePRDefPtr a,
+ virStoragePRDefPtr b)
+{
+ if (!a && !b)
+ return true;
+
+ if (!a || !b)
+ return false;
+
+ if (a->enabled != b->enabled ||
+ a->managed != b->managed ||
+ STRNEQ_NULLABLE(a->path, b->path))
+ return false;
+
+ return true;
+}
+
+
virSecurityDeviceLabelDefPtr
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
const char *model)
virStoragePRDefPtr virStoragePRDefParseXML(xmlXPathContextPtr ctxt);
void virStoragePRDefFormat(virBufferPtr buf,
virStoragePRDefPtr prd);
+bool virStoragePRDefIsEqual(virStoragePRDefPtr a,
+ virStoragePRDefPtr b);
virSecurityDeviceLabelDefPtr
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,