Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807108/?format=api
{ "id": 807108, "url": "http://patchwork.ozlabs.org/api/patches/807108/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504016587-39779-7-git-send-email-pradeep.jagadeesh@huawei.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504016587-39779-7-git-send-email-pradeep.jagadeesh@huawei.com>", "list_archive_url": null, "date": "2017-08-29T14:23:07", "name": "[v8,6/6] fsdev: QMP interface for throttling", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "180ba759e177b6189df1227b25cdf69542303bd7", "submitter": { "id": 69852, "url": "http://patchwork.ozlabs.org/api/people/69852/?format=api", "name": "Pradeep Jagadeesh", "email": "pradeepkiruvale@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504016587-39779-7-git-send-email-pradeep.jagadeesh@huawei.com/mbox/", "series": [ { "id": 377, "url": "http://patchwork.ozlabs.org/api/series/377/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=377", "date": "2017-08-29T14:23:01", "name": "fsdev: qmp interface for io throttling", "version": 8, "mbox": "http://patchwork.ozlabs.org/series/377/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807108/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807108/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"YGGOvado\"; dkim-atps=neutral" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhWDj2Cf6z9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 00:27:17 +1000 (AEST)", "from localhost ([::1]:45226 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmhU3-0004O0-6t\n\tfor incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 10:27:15 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:53753)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pradeepkiruvale@gmail.com>) id 1dmhR3-0001kH-Se\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:12 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pradeepkiruvale@gmail.com>) id 1dmhQy-0004FG-Qp\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:09 -0400", "from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:37082)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <pradeepkiruvale@gmail.com>)\n\tid 1dmhQy-0004Ep-HH\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:04 -0400", "by mail-wm0-x242.google.com with SMTP id x189so3901219wmg.4\n\tfor <qemu-devel@nongnu.org>; Tue, 29 Aug 2017 07:24:04 -0700 (PDT)", "from localhost.localdomain.localdomain ([217.110.131.66])\n\tby smtp.gmail.com with ESMTPSA id\n\t15sm2540487wmv.45.2017.08.29.07.24.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 07:24:02 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=ZkauxHtcgWdF+IFL+Ra2PQkRheUtait0xIgtdMDBvgU=;\n\tb=YGGOvadot6kAvnEi3CMUpOAKDSx4ADUMiqwzm2fMkKCs0BfVS33xJ1SbTDbPZ7LH44\n\tzCCPkO0ljLJ2TMpuB6avdKrES3+1dSrjROE0W/Xx9r4CQpUpdOS5PiJo0AKkJIRpeBRg\n\tsuPUOhF7fdugjGe3asofbcp213LIkZK7vtWI2npY5GGDNQHX7/ew6CJeN0GKGGoKsCCD\n\t2lWaTG/5AFnj20rgD2pqOEFUotKqY59TOB5vXkHb9Cg3uG5svpc5fa0uqSOmuwaQ931F\n\tDDxt96i3XksIScSUzSQbyjLZE8XlFThTbF/YgTO82SUZ1Jt0Qz6KXKV2sK9z/eyz312W\n\toSsg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=ZkauxHtcgWdF+IFL+Ra2PQkRheUtait0xIgtdMDBvgU=;\n\tb=ZsXOF/CPU05jxfW46F9KrBBr9YpIWAlVycCB4h4n5kgvxB3DCOhhMCddhH+VT2GmEp\n\tNjYS94TltKk4QCNMi2lmm8wMlJy3mOetX94mfzSqgitB2wJDrLiubpyzNQTfzk1daB8n\n\tCFwoKZu/aYImcL3bWU8yjDGLpvsMJMO8BhBEktB8HsetNXKGkr6gvJwo6JveXy3vORVU\n\t2H5vXkxfbHQwqm/W3MSiNIpLiAHdzHQ76ti3xsmauZD94TfBNO32+SDGDQWTXwspFlzs\n\tEzoCmYsnjLiZQR2kIBojJ7WjCWFP2ta0IveCGFuY5YomONXwZoVsMVBvg4qvi988kK7J\n\tlMjA==", "X-Gm-Message-State": "AHYfb5jp9fkKaBDZIQ1fcU4jpYxug75Fgc4jLG2BoLk2nP6pVkO/esL5\n\tYSg2gR5vOpRgSg==", "X-Received": "by 10.28.107.77 with SMTP id g74mr1060417wmc.48.1504016643399;\n\tTue, 29 Aug 2017 07:24:03 -0700 (PDT)", "From": "Pradeep Jagadeesh <pradeepkiruvale@gmail.com>", "X-Google-Original-From": "Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>", "To": "\"eric blake\" <eblake@redhat.com>,\n\t\"greg kurz\" <groug@kaod.org>", "Date": "Tue, 29 Aug 2017 10:23:07 -0400", "Message-Id": "<1504016587-39779-7-git-send-email-pradeep.jagadeesh@huawei.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1504016587-39779-1-git-send-email-pradeep.jagadeesh@huawei.com>", "References": "<1504016587-39779-1-git-send-email-pradeep.jagadeesh@huawei.com>", "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.", "X-Received-From": "2a00:1450:400c:c09::242", "Subject": "[Qemu-devel] [PATCH v8 6/6] fsdev: QMP interface for throttling", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "qemu-devel@nongnu.org, jani kokkonen <jani.kokkonen@huawei.com>,\n\talberto garcia <berto@igalia.com>,\n\tPradeep Jagadeesh <pradeep.jagadeesh@huawei.com>,\n\t\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "This patch introduces qmp interfaces for the fsdev\ndevices. This provides two interfaces one\nfor querying info of all the fsdev devices. The second one\nto set the IO limits for the required fsdev device.\n\nSigned-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>\n---\n Makefile | 4 +++\n fsdev/qemu-fsdev-dummy.c | 11 ++++++\n fsdev/qemu-fsdev-throttle.c | 76 ++++++++++++++++++++++++++++++++++++++++++\n fsdev/qemu-fsdev-throttle.h | 8 +++--\n fsdev/qemu-fsdev.c | 38 +++++++++++++++++++++\n monitor.c | 5 +++\n qapi-schema.json | 3 ++\n qapi/fsdev.json | 81 +++++++++++++++++++++++++++++++++++++++++++++\n qmp.c | 14 ++++++++\n 9 files changed, 238 insertions(+), 2 deletions(-)\n create mode 100644 qapi/fsdev.json", "diff": "diff --git a/Makefile b/Makefile\nindex 81447b1..ec31ffa 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -414,6 +414,10 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \\\n $(SRC_PATH)/qapi/crypto.json $(SRC_PATH)/qapi/rocker.json \\\n $(SRC_PATH)/qapi/trace.json\n \n+ifdef CONFIG_VIRTFS\n+qapi-modules += $(SRC_PATH)/qapi/fsdev.json\n+endif\n+\n qapi-types.c qapi-types.h :\\\n $(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)\n \t$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \\\ndiff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c\nindex 6dc0fbc..28c82d2 100644\n--- a/fsdev/qemu-fsdev-dummy.c\n+++ b/fsdev/qemu-fsdev-dummy.c\n@@ -14,8 +14,19 @@\n #include \"qemu-fsdev.h\"\n #include \"qemu/config-file.h\"\n #include \"qemu/module.h\"\n+#include \"qmp-commands.h\"\n \n int qemu_fsdev_add(QemuOpts *opts)\n {\n return 0;\n }\n+\n+void qmp_fsdev_set_io_throttle(IOThrottle *arg, Error **errp)\n+{\n+ return;\n+}\n+\n+IOThrottleList *qmp_query_fsdev_io_throttle(Error **errp)\n+{\n+ return NULL;\n+}\ndiff --git a/fsdev/qemu-fsdev-throttle.c b/fsdev/qemu-fsdev-throttle.c\nindex 0e6fb86..184ed4c 100644\n--- a/fsdev/qemu-fsdev-throttle.c\n+++ b/fsdev/qemu-fsdev-throttle.c\n@@ -16,6 +16,7 @@\n #include \"qemu/error-report.h\"\n #include \"qemu-fsdev-throttle.h\"\n #include \"qemu/iov.h\"\n+#include \"qemu/main-loop.h\"\n #include \"qemu/throttle-options.h\"\n \n static void fsdev_throttle_read_timer_cb(void *opaque)\n@@ -30,6 +31,81 @@ static void fsdev_throttle_write_timer_cb(void *opaque)\n qemu_co_enter_next(&fst->throttled_reqs[true]);\n }\n \n+void fsdev_set_io_throttle(IOThrottle *arg, FsThrottle *fst, Error **errp)\n+{\n+ ThrottleConfig cfg;\n+\n+ throttle_set_io_limits(&cfg, arg);\n+\n+ if (throttle_is_valid(&cfg, errp)) {\n+ fst->cfg = cfg;\n+ fsdev_throttle_init(fst);\n+ }\n+}\n+\n+void fsdev_get_io_throttle(FsThrottle *fst, IOThrottle **fs9pcfg,\n+ char *fsdevice, Error **errp)\n+{\n+\n+ ThrottleConfig cfg = fst->cfg;\n+ IOThrottle *fscfg = g_malloc0(sizeof(*fscfg));\n+\n+ fscfg->has_id = true;\n+ fscfg->id = g_strdup(fsdevice);\n+ fscfg->bps = cfg.buckets[THROTTLE_BPS_TOTAL].avg;\n+ fscfg->bps_rd = cfg.buckets[THROTTLE_BPS_READ].avg;\n+ fscfg->bps_wr = cfg.buckets[THROTTLE_BPS_WRITE].avg;\n+\n+ fscfg->iops = cfg.buckets[THROTTLE_OPS_TOTAL].avg;\n+ fscfg->iops_rd = cfg.buckets[THROTTLE_OPS_READ].avg;\n+ fscfg->iops_wr = cfg.buckets[THROTTLE_OPS_WRITE].avg;\n+\n+ fscfg->has_bps_max = cfg.buckets[THROTTLE_BPS_TOTAL].max;\n+ fscfg->bps_max = cfg.buckets[THROTTLE_BPS_TOTAL].max;\n+ fscfg->has_bps_rd_max = cfg.buckets[THROTTLE_BPS_READ].max;\n+ fscfg->bps_rd_max = cfg.buckets[THROTTLE_BPS_READ].max;\n+ fscfg->has_bps_wr_max = cfg.buckets[THROTTLE_BPS_WRITE].max;\n+ fscfg->bps_wr_max = cfg.buckets[THROTTLE_BPS_WRITE].max;\n+\n+ fscfg->has_iops_max = cfg.buckets[THROTTLE_OPS_TOTAL].max;\n+ fscfg->iops_max = cfg.buckets[THROTTLE_OPS_TOTAL].max;\n+ fscfg->has_iops_rd_max = cfg.buckets[THROTTLE_OPS_READ].max;\n+ fscfg->iops_rd_max = cfg.buckets[THROTTLE_OPS_READ].max;\n+ fscfg->has_iops_wr_max = cfg.buckets[THROTTLE_OPS_WRITE].max;\n+ fscfg->iops_wr_max = cfg.buckets[THROTTLE_OPS_WRITE].max;\n+\n+ fscfg->has_bps_max_length = fscfg->has_bps_max;\n+ fscfg->bps_max_length =\n+ cfg.buckets[THROTTLE_BPS_TOTAL].burst_length;\n+ fscfg->has_bps_rd_max_length = fscfg->has_bps_rd_max;\n+ fscfg->bps_rd_max_length =\n+ cfg.buckets[THROTTLE_BPS_READ].burst_length;\n+ fscfg->has_bps_wr_max_length = fscfg->has_bps_wr_max;\n+ fscfg->bps_wr_max_length =\n+ cfg.buckets[THROTTLE_BPS_WRITE].burst_length;\n+\n+ fscfg->has_iops_max_length = fscfg->has_iops_max;\n+ fscfg->iops_max_length =\n+ cfg.buckets[THROTTLE_OPS_TOTAL].burst_length;\n+ fscfg->has_iops_rd_max_length = fscfg->has_iops_rd_max;\n+ fscfg->iops_rd_max_length =\n+ cfg.buckets[THROTTLE_OPS_READ].burst_length;\n+ fscfg->has_iops_wr_max_length = fscfg->has_iops_wr_max;\n+ fscfg->iops_wr_max_length =\n+ cfg.buckets[THROTTLE_OPS_WRITE].burst_length;\n+\n+ fscfg->bps_max_length = cfg.buckets[THROTTLE_BPS_TOTAL].burst_length;\n+ fscfg->bps_rd_max_length = cfg.buckets[THROTTLE_BPS_READ].burst_length;\n+ fscfg->bps_wr_max_length = cfg.buckets[THROTTLE_BPS_WRITE].burst_length;\n+ fscfg->iops_max_length = cfg.buckets[THROTTLE_OPS_TOTAL].burst_length;\n+ fscfg->iops_rd_max_length = cfg.buckets[THROTTLE_OPS_READ].burst_length;\n+ fscfg->iops_wr_max_length = cfg.buckets[THROTTLE_OPS_WRITE].burst_length;\n+\n+ fscfg->iops_size = cfg.op_size;\n+\n+ *fs9pcfg = fscfg;\n+}\n+\n void fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)\n {\n throttle_parse_options(&fst->cfg, opts);\ndiff --git a/fsdev/qemu-fsdev-throttle.h b/fsdev/qemu-fsdev-throttle.h\nindex e418643..1db9125 100644\n--- a/fsdev/qemu-fsdev-throttle.h\n+++ b/fsdev/qemu-fsdev-throttle.h\n@@ -15,8 +15,6 @@\n #ifndef _FSDEV_THROTTLE_H\n #define _FSDEV_THROTTLE_H\n \n-#include \"block/aio.h\"\n-#include \"qemu/main-loop.h\"\n #include \"qemu/coroutine.h\"\n #include \"qapi/error.h\"\n #include \"qemu/throttle.h\"\n@@ -36,4 +34,10 @@ void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool ,\n struct iovec *, int);\n \n void fsdev_throttle_cleanup(FsThrottle *);\n+\n+void fsdev_set_io_throttle(IOThrottle *, FsThrottle *, Error **errp);\n+\n+void fsdev_get_io_throttle(FsThrottle *, IOThrottle **iothp,\n+ char *, Error **errp);\n+\n #endif /* _FSDEV_THROTTLE_H */\ndiff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c\nindex 266e442..63dc1b5 100644\n--- a/fsdev/qemu-fsdev.c\n+++ b/fsdev/qemu-fsdev.c\n@@ -16,6 +16,7 @@\n #include \"qemu-common.h\"\n #include \"qemu/config-file.h\"\n #include \"qemu/error-report.h\"\n+#include \"qmp-commands.h\"\n \n static QTAILQ_HEAD(FsDriverEntry_head, FsDriverListEntry) fsdriver_entries =\n QTAILQ_HEAD_INITIALIZER(fsdriver_entries);\n@@ -98,3 +99,40 @@ FsDriverEntry *get_fsdev_fsentry(char *id)\n }\n return NULL;\n }\n+\n+void qmp_fsdev_set_io_throttle(IOThrottle *arg, Error **errp)\n+{\n+\n+ FsDriverEntry *fse;\n+\n+ fse = get_fsdev_fsentry(arg->has_id ? arg->id : NULL);\n+ if (!fse) {\n+ error_setg(errp, \"Not a valid fsdev device\");\n+ return;\n+ }\n+\n+ fsdev_set_io_throttle(arg, &fse->fst, errp);\n+}\n+\n+IOThrottleList *qmp_query_fsdev_io_throttle(Error **errp)\n+{\n+ IOThrottleList *head = NULL, *p_next;\n+ struct FsDriverListEntry *fsle;\n+ Error *local_err = NULL;\n+\n+ QTAILQ_FOREACH(fsle, &fsdriver_entries, next) {\n+ p_next = g_new0(IOThrottleList, 1);\n+ fsdev_get_io_throttle(&fsle->fse.fst, &p_next->value,\n+ fsle->fse.fsdev_id, &local_err);\n+ if (local_err) {\n+ error_propagate(errp, local_err);\n+ g_free(p_next);\n+ qapi_free_IOThrottleList(head);\n+ return NULL;\n+ }\n+\n+ p_next->next = head;\n+ head = p_next;\n+ }\n+ return head;\n+}\ndiff --git a/monitor.c b/monitor.c\nindex e0f8801..eebda1c 100644\n--- a/monitor.c\n+++ b/monitor.c\n@@ -998,6 +998,11 @@ static void qmp_unregister_commands_hack(void)\n && !defined(TARGET_S390X)\n qmp_unregister_command(&qmp_commands, \"query-cpu-definitions\");\n #endif\n+#ifndef CONFIG_VIRTFS\n+ qmp_unregister_command(&qmp_commands, \"fsdev-set-io-throttle\");\n+ qmp_unregister_command(&qmp_commands, \"query-fsdev-io-throttle\");\n+#endif\n+\n }\n \n void monitor_init_qmp_commands(void)\ndiff --git a/qapi-schema.json b/qapi-schema.json\nindex 802ea53..8cf8140 100644\n--- a/qapi-schema.json\n+++ b/qapi-schema.json\n@@ -81,6 +81,9 @@\n # QAPI block definitions\n { 'include': 'qapi/block.json' }\n \n+# QAPI fsdev definitions\n+{ 'include': 'qapi/fsdev.json' }\n+\n # QAPI event definitions\n { 'include': 'qapi/event.json' }\n \ndiff --git a/qapi/fsdev.json b/qapi/fsdev.json\nnew file mode 100644\nindex 0000000..21d074d\n--- /dev/null\n+++ b/qapi/fsdev.json\n@@ -0,0 +1,81 @@\n+# -*- Mode: Python -*-\n+\n+##\n+# == QAPI fsdev definitions\n+##\n+\n+##\n+# @fsdev-set-io-throttle:\n+#\n+# Change I/O limits for a 9p/fsdev device.\n+#\n+# I/O limits can be enabled by setting throttle value to non-zero number.\n+#\n+# I/O limits can be disabled by setting all throttle values to 0.\n+#\n+# Returns: Nothing on success\n+# If @device is not a valid fsdev device, GenericError\n+#\n+# Since: 2.11\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"fsdev-set-io-throttle\",\n+# \"arguments\": { \"id\": \"id0-1-0\",\n+# \"bps\": 1000000,\n+# \"bps_rd\": 0,\n+# \"bps_wr\": 0,\n+# \"iops\": 0,\n+# \"iops_rd\": 0,\n+# \"iops_wr\": 0,\n+# \"bps_max\": 8000000,\n+# \"bps_rd_max\": 0,\n+# \"bps_wr_max\": 0,\n+# \"iops_max\": 0,\n+# \"iops_rd_max\": 0,\n+# \"iops_wr_max\": 0,\n+# \"bps_max_length\": 60,\n+# \"iops_size\": 0 } }\n+# <- { \"returns\": {} }\n+##\n+{ 'command': 'fsdev-set-io-throttle', 'boxed': true,\n+ 'data': 'IOThrottle' }\n+##\n+# @query-fsdev-io-throttle:\n+#\n+# Returns: a list of @IOThrottle describing I/O throttle\n+# values of each fsdev device\n+#\n+# Since: 2.11\n+#\n+# Example:\n+#\n+# -> { \"Execute\": \"query-fsdev-io-throttle\" }\n+# <- { \"returns\" : [\n+# {\n+# \"id\": \"id0-hd0\",\n+# \"bps\":1000000,\n+# \"bps_rd\":0,\n+# \"bps_wr\":0,\n+# \"iops\":1000000,\n+# \"iops_rd\":0,\n+# \"iops_wr\":0,\n+# \"bps_max\": 8000000,\n+# \"bps_rd_max\": 0,\n+# \"bps_wr_max\": 0,\n+# \"iops_max\": 0,\n+# \"iops_rd_max\": 0,\n+# \"iops_wr_max\": 0,\n+# \"bps_max_length\": 0,\n+# \"bps_rd_max_length\": 0,\n+# \"bps_wr_max_length\": 0,\n+# \"iops_max_length\": 0,\n+# \"iops_rd_max_length\": 0,\n+# \"iops_wr_max_length\": 0,\n+# \"iops_size\": 0\n+# }\n+# ]\n+# }\n+#\n+##\n+{ 'command': 'query-fsdev-io-throttle', 'returns': [ 'IOThrottle' ] }\ndiff --git a/qmp.c b/qmp.c\nindex b86201e..eed91e5 100644\n--- a/qmp.c\n+++ b/qmp.c\n@@ -130,6 +130,20 @@ void qmp_cpu_add(int64_t id, Error **errp)\n }\n }\n \n+#if defined(_WIN64) || defined(_WIN32) || defined(__FreeBSD__)\n+\n+void qmp_fsdev_set_io_throttle(IOThrottle *arg, Error **errp)\n+{\n+ return;\n+}\n+\n+IOThrottleList *qmp_query_fsdev_io_throttle(Error **errp)\n+{\n+ return NULL;\n+}\n+\n+#endif\n+\n #ifndef CONFIG_VNC\n /* If VNC support is enabled, the \"true\" query-vnc command is\n defined in the VNC subsystem */\n", "prefixes": [ "v8", "6/6" ] }