]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: Drop aio/cache consistency check from qmp_blockdev_add()
authorKevin Wolf <kwolf@redhat.com>
Wed, 7 Sep 2016 13:26:42 +0000 (15:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 29 Sep 2016 12:13:38 +0000 (14:13 +0200)
The TODO comment has been addressed a while ago and this is now checked
in raw-posix, so we don't have to special case this in blockdev-add any
more.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
blockdev.c
tests/qemu-iotests/087.out

index 62d0dd016f1ff53a3ccdc91d6fb18b26abcbfb96..7820f42210465d3bc7f79c214e4429c9081bb191 100644 (file)
@@ -3832,21 +3832,6 @@ void qmp_blockdev_add(BlockdevOptions *options, Error **errp)
     QDict *qdict;
     Error *local_err = NULL;
 
-    /* TODO Sort it out in raw-posix and drive_new(): Reject aio=native with
-     * cache.direct=false instead of silently switching to aio=threads, except
-     * when called from drive_new().
-     *
-     * For now, simply forbidding the combination for all drivers will do. */
-    if (options->has_aio && options->aio == BLOCKDEV_AIO_OPTIONS_NATIVE) {
-        bool direct = options->has_cache &&
-                      options->cache->has_direct &&
-                      options->cache->direct;
-        if (!direct) {
-            error_setg(errp, "aio=native requires cache.direct=true");
-            goto fail;
-        }
-    }
-
     visit_type_BlockdevOptions(v, NULL, &options, &local_err);
     if (local_err) {
         error_propagate(errp, local_err);
index bef68626c8d75e0f7544c2f8f97c1e88c81d55a1..cd02eaed4cb35a7c570b1dc42425d174f1b3f738 100644 (file)
@@ -27,7 +27,7 @@ QMP_VERSION
 Testing:
 QMP_VERSION
 {"return": {}}
-{"error": {"class": "GenericError", "desc": "aio=native requires cache.direct=true"}}
+{"error": {"class": "GenericError", "desc": "aio=native was specified, but it requires cache.direct=on, which was not specified."}}
 {"return": {}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN"}