Am 13.06.2012 um 15:52 schrieb Daniel P. Berrange: > On Tue, Jun 12, 2012 at 10:31:54AM +0200, Sebastian Wiedenroth wrote: >> + >> + cmd = virCommandNew(COLLIE); >> + virCommandAddArgList(cmd, "vdi", "list", vol->name, "-r", NULL); >> + virStorageBackendSheepdogAddHostArg(cmd, pool); >> + virCommandSetOutputBuffer(cmd, &output); >> + ret = virCommandRun(cmd, NULL); >> + >> + if (ret < 0) >> + goto cleanup; >> + >> + if ((ret = virStorageBackendSheepdogParseVdiList(vol, output)) < 0) >> + goto cleanup; >> + >> + vol->type = VIR_STORAGE_VOL_NETWORK; >> + >> + VIR_FREE(vol->key); >> + if (virAsprintf(&vol->key, "%s/%s", >> + pool->def->source.name, vol->name) == -1) { >> + virReportOOMError(); >> + goto cleanup; >> + } > > Does sheepdog associate any kind of globally unique UUID with > storage volumes ? If so, it'd be desirable to use that as the > key, instead of being name based, so that we have stronger > uniqueness & stability guarentees. Sheepdog storage volumes do have a very short "vdi id" which is calculated from the hash of the name. So using the name, as collie does, should be fine. > All in all, i think this looks good Thanks for the review. I'll repost a v2 after addressing the remaining issues. Best regards, Sebastian -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list