From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bosps-00013C-2y for qemu-devel@nongnu.org; Tue, 27 Sep 2016 09:54:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bospq-0001EI-4P for qemu-devel@nongnu.org; Tue, 27 Sep 2016 09:54:15 -0400 From: Kevin Wolf Date: Tue, 27 Sep 2016 15:53:48 +0200 Message-Id: <1474984441-28516-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1474984441-28516-1-git-send-email-kwolf@redhat.com> References: <1474984441-28516-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 05/18] block: Drop aio/cache consistency check from qmp_blockdev_add() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org 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 Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- blockdev.c | 15 --------------- tests/qemu-iotests/087.out | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/blockdev.c b/blockdev.c index 62d0dd0..7820f42 100644 --- a/blockdev.c +++ b/blockdev.c @@ -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); diff --git a/tests/qemu-iotests/087.out b/tests/qemu-iotests/087.out index bef6862..cd02eae 100644 --- a/tests/qemu-iotests/087.out +++ b/tests/qemu-iotests/087.out @@ -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"} -- 1.8.3.1