[sheepdog] [Patch]Fix bugs of Sheepdog storage driver
harryxiyou at gmail.com
harryxiyou at gmail.com
Fri Feb 8 05:41:41 CET 2013
diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c
index cd18f33..f987604 100644
--- a/src/storage/storage_backend_sheepdog.c
+++ b/src/storage/storage_backend_sheepdog.c
@@ -168,9 +168,12 @@ virStorageBackendSheepdogCreateVol(virConnectPtr conn ATTRIBUTE_UNUSED,
virCommandAddArgFormat(cmd, "%llu", vol->capacity);
virStorageBackendSheepdogAddHostArg(cmd, pool);
ret = virCommandRun(cmd, NULL);
+ if (ret < 0)
+ goto cleanup;
- virStorageBackendSheepdogRefreshVol(conn, pool, vol);
+ ret = virStorageBackendSheepdogRefreshVol(conn, pool, vol);
+cleanup:
virCommandFree(cmd);
return ret;
}
--
1.7.0.4
More information about the sheepdog
mailing list