[libvirt] [PATCH] [PATCH]Correct syntax-check Using qemu with sheepdog pool

From: Joel SIMOES <joel.simoes@laposte.net> --- src/qemu/qemu_conf.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index dfafcdc..954542a 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1215,17 +1215,13 @@ qemuAddSheepPoolSourceHost(virDomainDiskDefPtr def, 7000) < 0) goto cleanup; - - - - /* Storage pool have not supported these 2 attributes yet, * use the defaults. */ def->hosts[0].transport = VIR_DOMAIN_DISK_PROTO_TRANS_TCP; def->hosts[0].socket = NULL; - + def->protocol = VIR_DOMAIN_DISK_PROTOCOL_SHEEPDOG; ret = 0; @@ -1402,15 +1398,14 @@ qemuTranslateDiskSourcePool(virConnectPtr conn, def->srcpool->pooltype = pooldef->type; def->srcpool->voltype = info.type; - - if (def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI && !(def->srcpool->mode == VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG) ) { - + + if (def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI && !(def->srcpool->mode == VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG)) { virReportError(VIR_ERR_XML_ERROR, "%s", _("disk source mode is only valid when " "storage pool is of iscsi type or only direct for sheepdog ")); goto cleanup; } - + VIR_FREE(def->src); virDomainDiskHostDefFree(def->nhosts, def->hosts); virDomainDiskAuthClear(def); @@ -1496,11 +1491,10 @@ qemuTranslateDiskSourcePool(virConnectPtr conn, def->srcpool->mode = VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT; def->protocol = VIR_DOMAIN_DISK_PROTOCOL_SHEEPDOG; def->src = virStorageVolGetPath(vol); - qemuAddSheepPoolSourceHost(def, pooldef); break; case VIR_STORAGE_POOL_MPATH: - case VIR_STORAGE_POOL_RBD: + case VIR_STORAGE_POOL_RBD: case VIR_STORAGE_POOL_GLUSTER: case VIR_STORAGE_POOL_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- 1.8.3.2

On 01/23/2014 10:46 AM, joel SIMOES wrote:
From: Joel SIMOES <joel.simoes@laposte.net>
--- src/qemu/qemu_conf.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
This patch doesn't apply to libvirt.git: $ git am -3 ../pool.eml Applying: Correct syntax-check Using qemu with sheepdog pool fatal: sha1 information is lacking or useless (src/qemu/qemu_conf.c). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Correct syntax-check Using qemu with sheepdog pool The copy of the patch that failed is found in: /home/eblake/libvirt/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Is this a modification to a patch you posted earlier? If so, it's better to use git to squash the two patches into one (I use 'git rebase -i', then change 'pick' to 'squash' on the second patch in the editor it pulls up), and then repost a v2 of the correct patch to begin with. Having independent threads, where one thread tries to clean up a mess left in another, gets very hard to follow. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
joel SIMOES