Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813772/?format=api
{ "id": 813772, "url": "http://patchwork.ozlabs.org/api/patches/813772/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1505385610-35529-6-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": "<1505385610-35529-6-git-send-email-pradeep.jagadeesh@huawei.com>", "list_archive_url": null, "date": "2017-09-14T10:40:09", "name": "[v11,5/6] fsdev: QMP interface for throttling", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "4282f6d6640ff24a2017a429faa86b9ac1155659", "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/1505385610-35529-6-git-send-email-pradeep.jagadeesh@huawei.com/mbox/", "series": [ { "id": 3065, "url": "http://patchwork.ozlabs.org/api/series/3065/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3065", "date": "2017-09-14T10:40:06", "name": "fsdev: qmp interface for io throttling", "version": 11, "mbox": "http://patchwork.ozlabs.org/series/3065/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/813772/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813772/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=\"BgCPh1bv\"; 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 3xtFWJ5H5Mz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 20:43:40 +1000 (AEST)", "from localhost ([::1]:46874 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 1dsRcQ-0000hw-SE\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 06:43:38 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:52201)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pradeepkiruvale@gmail.com>) id 1dsRZi-0006q5-38\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 06:40:52 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pradeepkiruvale@gmail.com>) id 1dsRZf-000207-VP\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 06:40:50 -0400", "from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:38375)\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 1dsRZf-0001z0-8P\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 06:40:47 -0400", "by mail-wr0-x244.google.com with SMTP id p37so1458586wrb.5\n\tfor <qemu-devel@nongnu.org>; Thu, 14 Sep 2017 03:40:47 -0700 (PDT)", "from localhost.localdomain.localdomain ([217.110.131.66])\n\tby smtp.gmail.com with ESMTPSA id\n\tw14sm742801wmf.13.2017.09.14.03.40.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 14 Sep 2017 03:40:45 -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=HXYTlBtDvBwPDvW/trOYGphlLOm+RwMuPARdOH0lE44=;\n\tb=BgCPh1bvZTTHf20a2WYJ0eI8AnEmeyMfSBixVunb9MaC++woRI2cHx244KjBCQmYmw\n\t6ZZ3zPz6obOWundRVooOvX3nWex8d/Anf+mlGIIYi4SePoRUIMI4Xebc0+nAeKbTF/9Z\n\tTrqqliLm9wHJq+saOpKrUK+yIR+Ds93JQUM0nngnnl3ahMlDzSOlQAZZwCm8JhqXP5lh\n\twRdh85GgnoKyx8MQVsuiv+HjkplNFw9QjsOdbWLIB7BfS8c0wlflgYMRYC1g/jwkLOvZ\n\trXx56GRkiwRopaKpr3hLb9mmarfrZm8nznFPl5RUK/AmpWX3baP72mRzU3FdPNFt1enC\n\tf3XA==", "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=HXYTlBtDvBwPDvW/trOYGphlLOm+RwMuPARdOH0lE44=;\n\tb=X3gaKT6ekHVHbMs3GmmRk+3vNtsHAWrZXEXb++6uq1kyZ517oMPm4BlZ0MzGAfUNqU\n\toBEAkQ6aJvrkqmnHA6ya8j8CLp9BE7NxTt3pL6dhjxB2q2ejmDNDM7AxuYJfpQmUTaqY\n\tWAYuwi9l4NGky5s2oYoskYa+/eh8pHf1n8X+Jjc77khRvwgm0zpNzLxnWAcnA2NFUVWd\n\te4as/oOEIZRZ11lL7V/exCjVQbu8+ZOSHkw3IyXqlN2BKH1ddSb4XsUzdhrQ/AeBuDa9\n\tmpLLvQuuEnRJa+XDqPgCyIENVGgcOmQRsk78rMjwb+MusFtATUPG/i0HClOte+W6Ba6k\n\tmNwQ==", "X-Gm-Message-State": "AHPjjUjQXnIh7O5Hurupc7GtPNzqygfC7w4hS6Cw/ibT7YCNYdC5eqga\n\tN9XHZxvqJlFRWw==", "X-Google-Smtp-Source": "ADKCNb5/dpvBUhGf8xrYgly2+Q/pjN/Yq0PUIO5Rq04dBtHRDJHTUO4P3kD37M4KfUt+p76MLJzIYA==", "X-Received": "by 10.223.196.170 with SMTP id m39mr17851045wrf.44.1505385646065;\n\tThu, 14 Sep 2017 03:40:46 -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": "Thu, 14 Sep 2017 06:40:09 -0400", "Message-Id": "<1505385610-35529-6-git-send-email-pradeep.jagadeesh@huawei.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1505385610-35529-1-git-send-email-pradeep.jagadeesh@huawei.com>", "References": "<1505385610-35529-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:c0c::244", "Subject": "[Qemu-devel] [PATCH v11 5/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": "alberto garcia <berto@igalia.com>, Markus Armbruster <armbru@redhat.com>,\n\tqemu-devel@nongnu.org, \"Dr. David Alan Gilbert\" <dgilbert@redhat.com>,\n\tPradeep Jagadeesh <pradeep.jagadeesh@huawei.com>,\n\tjani kokkonen <jani.kokkonen@huawei.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>\nReviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>\n---\n Makefile | 3 +-\n fsdev/qemu-fsdev-dummy.c | 11 ++++++\n fsdev/qemu-fsdev-throttle.c | 96 ++++++++++++++++++++++++++++++++++++++++++---\n fsdev/qemu-fsdev-throttle.h | 9 ++++-\n fsdev/qemu-fsdev.c | 30 ++++++++++++++\n monitor.c | 5 +++\n qapi-schema.json | 4 ++\n qapi/fsdev.json | 81 ++++++++++++++++++++++++++++++++++++++\n qmp.c | 14 +++++++\n 9 files changed, 244 insertions(+), 9 deletions(-)\n create mode 100644 qapi/fsdev.json", "diff": "diff --git a/Makefile b/Makefile\nindex 337a1f6..6556dbf 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -421,7 +421,8 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \\\n $(SRC_PATH)/qapi/tpm.json \\\n $(SRC_PATH)/qapi/trace.json \\\n $(SRC_PATH)/qapi/transaction.json \\\n- $(SRC_PATH)/qapi/ui.json\n+ $(SRC_PATH)/qapi/ui.json \\\n+\t $(SRC_PATH)/qapi/fsdev.json\n \n qapi-types.c qapi-types.h :\\\n $(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)\ndiff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c\nindex 6dc0fbc..dc5cb6c 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(ThrottleLimits *arg, Error **errp)\n+{\n+ return;\n+}\n+\n+ThrottleLimitsList *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..fb7a6fa 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,92 @@ static void fsdev_throttle_write_timer_cb(void *opaque)\n qemu_co_enter_next(&fst->throttled_reqs[true]);\n }\n \n+typedef struct {\n+ FsThrottle *fst;\n+ bool is_write;\n+} RestartData;\n+\n+static bool coroutine_fn throttle_co_restart_queue(FsThrottle *fst,\n+ bool is_write)\n+{\n+ return qemu_co_queue_next(&fst->throttled_reqs[is_write]);\n+}\n+\n+static void schedule_next_request(FsThrottle *fst, bool is_write)\n+{\n+ bool must_wait = throttle_schedule_timer(&fst->ts, &fst->tt, is_write);\n+ if (!must_wait) {\n+ if (qemu_in_coroutine() &&\n+ throttle_co_restart_queue(fst, is_write)) {\n+ return;\n+ } else {\n+ int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);\n+ timer_mod(fst->tt.timers[is_write], now);\n+ }\n+ }\n+}\n+\n+static void coroutine_fn throttle_restart_queue_entry(void *opaque)\n+{\n+ RestartData *data = opaque;\n+ bool is_write = data->is_write;\n+ bool empty_queue = !throttle_co_restart_queue(data->fst, is_write);\n+ if (empty_queue) {\n+ schedule_next_request(data->fst, is_write);\n+ }\n+}\n+\n+static void throttle_restart_queues(FsThrottle *fst)\n+{\n+ Coroutine *co;\n+ RestartData rd = {\n+ .fst = fst,\n+ .is_write = true\n+ };\n+\n+ co = qemu_coroutine_create(throttle_restart_queue_entry, &rd);\n+ aio_co_enter(fst->ctx, co);\n+\n+ rd.is_write = false;\n+\n+ co = qemu_coroutine_create(throttle_restart_queue_entry, &rd);\n+ aio_co_enter(fst->ctx, co);\n+}\n+\n+static void coroutine_fn fsdev_throttle_config(FsThrottle *fst)\n+{\n+ if (throttle_enabled(&fst->cfg)) {\n+ throttle_config(&fst->ts, QEMU_CLOCK_REALTIME, &fst->cfg);\n+ } else {\n+ throttle_restart_queues(fst);\n+ }\n+}\n+\n+void fsdev_set_io_throttle(ThrottleLimits *arg, FsThrottle *fst, Error **errp)\n+{\n+ ThrottleConfig cfg;\n+\n+ throttle_get_config(&fst->ts, &cfg);\n+ throttle_limits_to_config(arg, &cfg, errp);\n+\n+ if (throttle_is_valid(&cfg, errp)) {\n+ fst->cfg = cfg;\n+ fsdev_throttle_config(fst);\n+ }\n+}\n+\n+void fsdev_get_io_throttle(FsThrottle *fst, ThrottleLimits **fs9pcfg,\n+ char *fsdevice)\n+{\n+ ThrottleConfig cfg = fst->cfg;\n+ ThrottleLimits *fscfg = g_malloc0(sizeof(*fscfg));\n+\n+ fscfg->has_id = true;\n+ fscfg->id = g_strdup(fsdevice);\n+ throttle_config_to_limits(&cfg, fscfg);\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);\n@@ -40,8 +127,9 @@ void fsdev_throttle_init(FsThrottle *fst)\n {\n if (throttle_enabled(&fst->cfg)) {\n throttle_init(&fst->ts);\n+ fst->ctx = qemu_get_aio_context();\n throttle_timers_init(&fst->tt,\n- qemu_get_aio_context(),\n+ fst->ctx,\n QEMU_CLOCK_REALTIME,\n fsdev_throttle_read_timer_cb,\n fsdev_throttle_write_timer_cb,\n@@ -62,11 +150,7 @@ void coroutine_fn fsdev_co_throttle_request(FsThrottle *fst, bool is_write,\n }\n \n throttle_account(&fst->ts, is_write, iov_size(iov, iovcnt));\n-\n- if (!qemu_co_queue_empty(&fst->throttled_reqs[is_write]) &&\n- !throttle_schedule_timer(&fst->ts, &fst->tt, is_write)) {\n- qemu_co_queue_next(&fst->throttled_reqs[is_write]);\n- }\n+ schedule_next_request(fst, is_write);\n }\n }\n \ndiff --git a/fsdev/qemu-fsdev-throttle.h b/fsdev/qemu-fsdev-throttle.h\nindex e418643..fc7409c 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@@ -25,6 +23,7 @@ typedef struct FsThrottle {\n ThrottleState ts;\n ThrottleTimers tt;\n ThrottleConfig cfg;\n+ AioContext *ctx;\n CoQueue throttled_reqs[2];\n } FsThrottle;\n \n@@ -36,4 +35,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(ThrottleLimits *, FsThrottle *, Error **errp);\n+\n+void fsdev_get_io_throttle(FsThrottle *, ThrottleLimits **iothp,\n+ char *);\n+\n #endif /* _FSDEV_THROTTLE_H */\ndiff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c\nindex 266e442..07bb005 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,32 @@ FsDriverEntry *get_fsdev_fsentry(char *id)\n }\n return NULL;\n }\n+\n+void qmp_fsdev_set_io_throttle(ThrottleLimits *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+ThrottleLimitsList *qmp_query_fsdev_io_throttle(Error **errp)\n+{\n+ ThrottleLimitsList *head = NULL, *p_next;\n+ struct FsDriverListEntry *fsle;\n+\n+ QTAILQ_FOREACH(fsle, &fsdriver_entries, next) {\n+ p_next = g_new0(ThrottleLimitsList, 1);\n+ fsdev_get_io_throttle(&fsle->fse.fst, &p_next->value,\n+ fsle->fse.fsdev_id);\n+ p_next->next = head;\n+ head = p_next;\n+ }\n+ return head;\n+}\ndiff --git a/monitor.c b/monitor.c\nindex 9239f7a..d12334f 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 f3af2cb..bd55190 100644\n--- a/qapi-schema.json\n+++ b/qapi-schema.json\n@@ -93,6 +93,10 @@\n { 'include': 'qapi/trace.json' }\n { 'include': 'qapi/introspect.json' }\n \n+# QAPI fsdev definitions\n+{ 'include': 'qapi/fsdev.json' }\n+\n+\n ##\n # = Miscellanea\n ##\ndiff --git a/qapi/fsdev.json b/qapi/fsdev.json\nnew file mode 100644\nindex 0000000..7babc30\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': 'ThrottleLimits' }\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': [ 'ThrottleLimits' ] }\ndiff --git a/qmp.c b/qmp.c\nindex b86201e..8de2e23 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(ThrottleLimits *arg, Error **errp)\n+{\n+ return;\n+}\n+\n+ThrottleLimitsList *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": [ "v11", "5/6" ] }