get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/813771/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 813771,
    "url": "http://patchwork.ozlabs.org/api/patches/813771/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1505385610-35529-2-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-2-git-send-email-pradeep.jagadeesh@huawei.com>",
    "list_archive_url": null,
    "date": "2017-09-14T10:40:05",
    "name": "[v11,1/6] throttle: factor out duplicate code",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8ab861376f99fb8410a35bbd819d578dbbba5527",
    "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-2-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/813771/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/813771/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=\"FWV7Kvt3\"; 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 3xtFWH0D5Dz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 20:43:39 +1000 (AEST)",
            "from localhost ([::1]:46872 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 1dsRcP-0000gJ-4L\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 06:43:37 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:52192)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pradeepkiruvale@gmail.com>) id 1dsRZh-0006pt-Qh\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 1dsRZd-0001xH-9T\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 06:40:49 -0400",
            "from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:34288)\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 1dsRZc-0001ul-S8\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 06:40:45 -0400",
            "by mail-wm0-x243.google.com with SMTP id i131so2887433wma.1\n\tfor <qemu-devel@nongnu.org>; Thu, 14 Sep 2017 03:40:43 -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.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 14 Sep 2017 03:40:41 -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=5JEgF++of2HEY1tgWrx2rTNG/tiuHdfoeMqx9yD0dmw=;\n\tb=FWV7Kvt3qzhI079pfZ6moTAwWcpEgSMchWn+bgZitl76/QYl/B5ZmYUnAaK8NAV4yI\n\t/X6unOc53pvTqV0FJojZnLWD2ZCyxhlfzOt13rcNMvLo117ubYHpBUdmv26GJ2GW7xce\n\tLONKuQB1mhtIAy/f9i+ce8VnBF4odXf9hlJwah1bsFlXUDDOHBIWOHCocNh9EE9qoYgB\n\tKNMfZUYzw+E2UjX5/VOnjy+LJ79dCKlLkB8ycrGd/UYO1MebpRRift8+b72QMhnyE6Vl\n\tHEPMuknlb2nLWXjEypj18WjltLsXokf/b79ztKVS5pTn3yBZTRGun2HjkerSa8t+6fOb\n\tmq4g==",
        "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=5JEgF++of2HEY1tgWrx2rTNG/tiuHdfoeMqx9yD0dmw=;\n\tb=F4QNmydl3CkdfDcn04TvUePNTt7i04+JydFvICo+UMD6WvXsUWCbpnQ1MT3OKSNgaK\n\tMBj0zgCISopAWx92abSK1HVRu2op4GrHh/ijdjH+e+ygJZrg91Uezc5/fjCZw0cG6HQ8\n\tXz2MPSlvx4UAT/Zv0wwvPSHX6aDAMCqLmBVyWwcyEna6eWTc7laGmMciQSaveYNbZKpA\n\tnOWfWwLuM9zufwZzEpgIOblqdyBi6+vpr+KRUVtxOwW6pN7/0Y1i09Avpcd4Vin1D2Db\n\tPPAqwPaUFtaMDjJOYoweVEmYSZto1kdiS4MKOymdDKd3vP3/ATlOGg9gbDjdUv9HuOJ3\n\to8VA==",
        "X-Gm-Message-State": "AHPjjUiBEhC6atsEGM6swSDQDI8kDE2Vl0gGaYNmxSd8YageLibSF5Iw\n\tQY0JVMcAeHn/Bg==",
        "X-Google-Smtp-Source": "AOwi7QBi6CEMlEf1o5wOL9wW3Fq2HqV983iH7EiPBCg5pMGCcT7NnQ9sizkPm2qYAPuX9EoVakf+TA==",
        "X-Received": "by 10.28.154.19 with SMTP id c19mr1706992wme.59.1505385642411;\n\tThu, 14 Sep 2017 03:40:42 -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:05 -0400",
        "Message-Id": "<1505385610-35529-2-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:c09::243",
        "Subject": "[Qemu-devel] [PATCH v11 1/6] throttle: factor out duplicate code",
        "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\tMarkus Armbruster <armbru@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 factors out the duplicate throttle code that was still\npresent in block and fsdev devices.\n\nSigned-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>\nReviewed-by: Alberto Garcia <berto@igalia.com>\nReviewed-by: Greg Kurz <groug@kaod.org>\nReviewed-by: Eric Blake <eblake@redhat.com>\n---\n blockdev.c                      | 44 +---------------------------------\n fsdev/qemu-fsdev-throttle.c     | 44 ++--------------------------------\n include/qemu/throttle-options.h |  3 +++\n include/qemu/throttle.h         |  4 ++--\n include/qemu/typedefs.h         |  1 +\n util/throttle.c                 | 52 +++++++++++++++++++++++++++++++++++++++++\n 6 files changed, 61 insertions(+), 87 deletions(-)",
    "diff": "diff --git a/blockdev.c b/blockdev.c\nindex 56a6b24..9d33c25 100644\n--- a/blockdev.c\n+++ b/blockdev.c\n@@ -387,49 +387,7 @@ static void extract_common_blockdev_options(QemuOpts *opts, int *bdrv_flags,\n     }\n \n     if (throttle_cfg) {\n-        throttle_config_init(throttle_cfg);\n-        throttle_cfg->buckets[THROTTLE_BPS_TOTAL].avg =\n-            qemu_opt_get_number(opts, \"throttling.bps-total\", 0);\n-        throttle_cfg->buckets[THROTTLE_BPS_READ].avg  =\n-            qemu_opt_get_number(opts, \"throttling.bps-read\", 0);\n-        throttle_cfg->buckets[THROTTLE_BPS_WRITE].avg =\n-            qemu_opt_get_number(opts, \"throttling.bps-write\", 0);\n-        throttle_cfg->buckets[THROTTLE_OPS_TOTAL].avg =\n-            qemu_opt_get_number(opts, \"throttling.iops-total\", 0);\n-        throttle_cfg->buckets[THROTTLE_OPS_READ].avg =\n-            qemu_opt_get_number(opts, \"throttling.iops-read\", 0);\n-        throttle_cfg->buckets[THROTTLE_OPS_WRITE].avg =\n-            qemu_opt_get_number(opts, \"throttling.iops-write\", 0);\n-\n-        throttle_cfg->buckets[THROTTLE_BPS_TOTAL].max =\n-            qemu_opt_get_number(opts, \"throttling.bps-total-max\", 0);\n-        throttle_cfg->buckets[THROTTLE_BPS_READ].max  =\n-            qemu_opt_get_number(opts, \"throttling.bps-read-max\", 0);\n-        throttle_cfg->buckets[THROTTLE_BPS_WRITE].max =\n-            qemu_opt_get_number(opts, \"throttling.bps-write-max\", 0);\n-        throttle_cfg->buckets[THROTTLE_OPS_TOTAL].max =\n-            qemu_opt_get_number(opts, \"throttling.iops-total-max\", 0);\n-        throttle_cfg->buckets[THROTTLE_OPS_READ].max =\n-            qemu_opt_get_number(opts, \"throttling.iops-read-max\", 0);\n-        throttle_cfg->buckets[THROTTLE_OPS_WRITE].max =\n-            qemu_opt_get_number(opts, \"throttling.iops-write-max\", 0);\n-\n-        throttle_cfg->buckets[THROTTLE_BPS_TOTAL].burst_length =\n-            qemu_opt_get_number(opts, \"throttling.bps-total-max-length\", 1);\n-        throttle_cfg->buckets[THROTTLE_BPS_READ].burst_length  =\n-            qemu_opt_get_number(opts, \"throttling.bps-read-max-length\", 1);\n-        throttle_cfg->buckets[THROTTLE_BPS_WRITE].burst_length =\n-            qemu_opt_get_number(opts, \"throttling.bps-write-max-length\", 1);\n-        throttle_cfg->buckets[THROTTLE_OPS_TOTAL].burst_length =\n-            qemu_opt_get_number(opts, \"throttling.iops-total-max-length\", 1);\n-        throttle_cfg->buckets[THROTTLE_OPS_READ].burst_length =\n-            qemu_opt_get_number(opts, \"throttling.iops-read-max-length\", 1);\n-        throttle_cfg->buckets[THROTTLE_OPS_WRITE].burst_length =\n-            qemu_opt_get_number(opts, \"throttling.iops-write-max-length\", 1);\n-\n-        throttle_cfg->op_size =\n-            qemu_opt_get_number(opts, \"throttling.iops-size\", 0);\n-\n+        throttle_parse_options(throttle_cfg, opts);\n         if (!throttle_is_valid(throttle_cfg, errp)) {\n             return;\n         }\ndiff --git a/fsdev/qemu-fsdev-throttle.c b/fsdev/qemu-fsdev-throttle.c\nindex 49eebb5..0e6fb86 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/throttle-options.h\"\n \n static void fsdev_throttle_read_timer_cb(void *opaque)\n {\n@@ -31,48 +32,7 @@ static void fsdev_throttle_write_timer_cb(void *opaque)\n \n void fsdev_throttle_parse_opts(QemuOpts *opts, FsThrottle *fst, Error **errp)\n {\n-    throttle_config_init(&fst->cfg);\n-    fst->cfg.buckets[THROTTLE_BPS_TOTAL].avg =\n-        qemu_opt_get_number(opts, \"throttling.bps-total\", 0);\n-    fst->cfg.buckets[THROTTLE_BPS_READ].avg  =\n-        qemu_opt_get_number(opts, \"throttling.bps-read\", 0);\n-    fst->cfg.buckets[THROTTLE_BPS_WRITE].avg =\n-        qemu_opt_get_number(opts, \"throttling.bps-write\", 0);\n-    fst->cfg.buckets[THROTTLE_OPS_TOTAL].avg =\n-        qemu_opt_get_number(opts, \"throttling.iops-total\", 0);\n-    fst->cfg.buckets[THROTTLE_OPS_READ].avg =\n-        qemu_opt_get_number(opts, \"throttling.iops-read\", 0);\n-    fst->cfg.buckets[THROTTLE_OPS_WRITE].avg =\n-        qemu_opt_get_number(opts, \"throttling.iops-write\", 0);\n-\n-    fst->cfg.buckets[THROTTLE_BPS_TOTAL].max =\n-        qemu_opt_get_number(opts, \"throttling.bps-total-max\", 0);\n-    fst->cfg.buckets[THROTTLE_BPS_READ].max  =\n-        qemu_opt_get_number(opts, \"throttling.bps-read-max\", 0);\n-    fst->cfg.buckets[THROTTLE_BPS_WRITE].max =\n-        qemu_opt_get_number(opts, \"throttling.bps-write-max\", 0);\n-    fst->cfg.buckets[THROTTLE_OPS_TOTAL].max =\n-        qemu_opt_get_number(opts, \"throttling.iops-total-max\", 0);\n-    fst->cfg.buckets[THROTTLE_OPS_READ].max =\n-        qemu_opt_get_number(opts, \"throttling.iops-read-max\", 0);\n-    fst->cfg.buckets[THROTTLE_OPS_WRITE].max =\n-        qemu_opt_get_number(opts, \"throttling.iops-write-max\", 0);\n-\n-    fst->cfg.buckets[THROTTLE_BPS_TOTAL].burst_length =\n-        qemu_opt_get_number(opts, \"throttling.bps-total-max-length\", 1);\n-    fst->cfg.buckets[THROTTLE_BPS_READ].burst_length  =\n-        qemu_opt_get_number(opts, \"throttling.bps-read-max-length\", 1);\n-    fst->cfg.buckets[THROTTLE_BPS_WRITE].burst_length =\n-        qemu_opt_get_number(opts, \"throttling.bps-write-max-length\", 1);\n-    fst->cfg.buckets[THROTTLE_OPS_TOTAL].burst_length =\n-        qemu_opt_get_number(opts, \"throttling.iops-total-max-length\", 1);\n-    fst->cfg.buckets[THROTTLE_OPS_READ].burst_length =\n-        qemu_opt_get_number(opts, \"throttling.iops-read-max-length\", 1);\n-    fst->cfg.buckets[THROTTLE_OPS_WRITE].burst_length =\n-        qemu_opt_get_number(opts, \"throttling.iops-write-max-length\", 1);\n-    fst->cfg.op_size =\n-        qemu_opt_get_number(opts, \"throttling.iops-size\", 0);\n-\n+    throttle_parse_options(&fst->cfg, opts);\n     throttle_is_valid(&fst->cfg, errp);\n }\n \ndiff --git a/include/qemu/throttle-options.h b/include/qemu/throttle-options.h\nindex 3528a8f..9709dcd 100644\n--- a/include/qemu/throttle-options.h\n+++ b/include/qemu/throttle-options.h\n@@ -9,6 +9,7 @@\n  */\n #ifndef THROTTLE_OPTIONS_H\n #define THROTTLE_OPTIONS_H\n+#include \"typedefs.h\"\n \n #define QEMU_OPT_IOPS_TOTAL \"iops-total\"\n #define QEMU_OPT_IOPS_TOTAL_MAX \"iops-total-max\"\n@@ -111,4 +112,6 @@\n             .help = \"when limiting by iops max size of an I/O in bytes\",\\\n         }\n \n+void throttle_parse_options(ThrottleConfig *, QemuOpts *);\n+\n #endif\ndiff --git a/include/qemu/throttle.h b/include/qemu/throttle.h\nindex 8c93237..b6ebc6d 100644\n--- a/include/qemu/throttle.h\n+++ b/include/qemu/throttle.h\n@@ -89,10 +89,10 @@ typedef struct LeakyBucket {\n  * However it allows to keep the code clean and the bucket field is reset to\n  * zero at the right time.\n  */\n-typedef struct ThrottleConfig {\n+struct ThrottleConfig {\n     LeakyBucket buckets[BUCKETS_COUNT]; /* leaky buckets */\n     uint64_t op_size;         /* size of an operation in bytes */\n-} ThrottleConfig;\n+};\n \n typedef struct ThrottleState {\n     ThrottleConfig cfg;       /* configuration */\ndiff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h\nindex 39bc835..90fe0f9 100644\n--- a/include/qemu/typedefs.h\n+++ b/include/qemu/typedefs.h\n@@ -100,6 +100,7 @@ typedef struct uWireSlave uWireSlave;\n typedef struct VirtIODevice VirtIODevice;\n typedef struct Visitor Visitor;\n typedef struct node_info NodeInfo;\n+typedef struct ThrottleConfig ThrottleConfig;\n typedef void SaveStateHandler(QEMUFile *f, void *opaque);\n typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);\n \ndiff --git a/util/throttle.c b/util/throttle.c\nindex 06bf916..9ef28c4 100644\n--- a/util/throttle.c\n+++ b/util/throttle.c\n@@ -27,6 +27,7 @@\n #include \"qemu/throttle.h\"\n #include \"qemu/timer.h\"\n #include \"block/aio.h\"\n+#include \"qemu/throttle-options.h\"\n \n /* This function make a bucket leak\n  *\n@@ -635,3 +636,54 @@ void throttle_config_to_limits(ThrottleConfig *cfg, ThrottleLimits *var)\n     var->has_iops_write_max_length = true;\n     var->has_iops_size = true;\n }\n+\n+/* parse the throttle options\n+ *\n+ * @opts: qemu options\n+ * @throttle_cfg: throttle configuration\n+ */\n+void throttle_parse_options(ThrottleConfig *throttle_cfg, QemuOpts *opts)\n+{\n+    throttle_config_init(throttle_cfg);\n+    throttle_cfg->buckets[THROTTLE_BPS_TOTAL].avg =\n+        qemu_opt_get_number(opts, \"throttling.bps-total\", 0);\n+    throttle_cfg->buckets[THROTTLE_BPS_READ].avg  =\n+        qemu_opt_get_number(opts, \"throttling.bps-read\", 0);\n+    throttle_cfg->buckets[THROTTLE_BPS_WRITE].avg =\n+        qemu_opt_get_number(opts, \"throttling.bps-write\", 0);\n+    throttle_cfg->buckets[THROTTLE_OPS_TOTAL].avg =\n+        qemu_opt_get_number(opts, \"throttling.iops-total\", 0);\n+    throttle_cfg->buckets[THROTTLE_OPS_READ].avg =\n+        qemu_opt_get_number(opts, \"throttling.iops-read\", 0);\n+    throttle_cfg->buckets[THROTTLE_OPS_WRITE].avg =\n+        qemu_opt_get_number(opts, \"throttling.iops-write\", 0);\n+\n+    throttle_cfg->buckets[THROTTLE_BPS_TOTAL].max =\n+        qemu_opt_get_number(opts, \"throttling.bps-total-max\", 0);\n+    throttle_cfg->buckets[THROTTLE_BPS_READ].max  =\n+        qemu_opt_get_number(opts, \"throttling.bps-read-max\", 0);\n+    throttle_cfg->buckets[THROTTLE_BPS_WRITE].max =\n+        qemu_opt_get_number(opts, \"throttling.bps-write-max\", 0);\n+    throttle_cfg->buckets[THROTTLE_OPS_TOTAL].max =\n+        qemu_opt_get_number(opts, \"throttling.iops-total-max\", 0);\n+    throttle_cfg->buckets[THROTTLE_OPS_READ].max =\n+        qemu_opt_get_number(opts, \"throttling.iops-read-max\", 0);\n+    throttle_cfg->buckets[THROTTLE_OPS_WRITE].max =\n+        qemu_opt_get_number(opts, \"throttling.iops-write-max\", 0);\n+\n+    throttle_cfg->buckets[THROTTLE_BPS_TOTAL].burst_length =\n+        qemu_opt_get_number(opts, \"throttling.bps-total-max-length\", 1);\n+    throttle_cfg->buckets[THROTTLE_BPS_READ].burst_length  =\n+        qemu_opt_get_number(opts, \"throttling.bps-read-max-length\", 1);\n+    throttle_cfg->buckets[THROTTLE_BPS_WRITE].burst_length =\n+        qemu_opt_get_number(opts, \"throttling.bps-write-max-length\", 1);\n+    throttle_cfg->buckets[THROTTLE_OPS_TOTAL].burst_length =\n+        qemu_opt_get_number(opts, \"throttling.iops-total-max-length\", 1);\n+    throttle_cfg->buckets[THROTTLE_OPS_READ].burst_length =\n+        qemu_opt_get_number(opts, \"throttling.iops-read-max-length\", 1);\n+    throttle_cfg->buckets[THROTTLE_OPS_WRITE].burst_length =\n+        qemu_opt_get_number(opts, \"throttling.iops-write-max-length\", 1);\n+\n+    throttle_cfg->op_size =\n+        qemu_opt_get_number(opts, \"throttling.iops-size\", 0);\n+}\n",
    "prefixes": [
        "v11",
        "1/6"
    ]
}