Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio fix for 2.4
Fixes migration in virtio 1 mode.
We still have a known bug with memory hotplug, it doesn't
look like we can fix that in time for 2.4.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Wed 05 Aug 2015 15:57:39 BST using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
* remotes/mst/tags/for_upstream:
virtio: fix 1.0 virtqueue migration
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
diff --git a/block/quorum.c b/block/quorum.c
index 4e66221..2f6c45f 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -865,12 +865,6 @@
int i;
int ret = 0;
- if (!qcrypto_hash_supports(QCRYPTO_HASH_ALG_SHA256)) {
- error_setg(errp,
- "SHA256 hash support is required for quorum device");
- return -EINVAL;
- }
-
qdict_flatten(options);
/* count how many different children are present */
@@ -1061,6 +1055,10 @@
static void bdrv_quorum_init(void)
{
+ if (!qcrypto_hash_supports(QCRYPTO_HASH_ALG_SHA256)) {
+ /* SHA256 hash support is required for quorum device */
+ return;
+ }
bdrv_register(&bdrv_quorum);
}