get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 806856,
    "url": "http://patchwork.ozlabs.org/api/patches/806856/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1503965694-10794-44-git-send-email-mdroth@linux.vnet.ibm.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": "<1503965694-10794-44-git-send-email-mdroth@linux.vnet.ibm.com>",
    "list_archive_url": null,
    "date": "2017-08-29T00:14:18",
    "name": "[43/79] tests: Add coverage for recent block geometry fixes",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "822a02a1f9d3db9457255d878bff115b12896ef3",
    "submitter": {
        "id": 5549,
        "url": "http://patchwork.ozlabs.org/api/people/5549/?format=api",
        "name": "Michael Roth",
        "email": "mdroth@linux.vnet.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1503965694-10794-44-git-send-email-mdroth@linux.vnet.ibm.com/mbox/",
    "series": [
        {
            "id": 281,
            "url": "http://patchwork.ozlabs.org/api/series/281/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=281",
            "date": "2017-08-29T00:13:45",
            "name": "Patch Round-up for stable 2.9.1, freeze on 2017-09-04",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/281/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806856/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806856/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>)",
        "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 3xh95s30Chz9s7M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 10:50:09 +1000 (AEST)",
            "from localhost ([::1]:42074 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 1dmUjH-00067s-8H\n\tfor incoming@patchwork.ozlabs.org; Mon, 28 Aug 2017 20:50:07 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:48183)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mdroth@linux.vnet.ibm.com>) id 1dmUCX-0001NO-MB\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:21 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mdroth@linux.vnet.ibm.com>) id 1dmUCU-0005Xm-Cv\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:17 -0400",
            "from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57759)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mdroth@linux.vnet.ibm.com>)\n\tid 1dmUCU-0005WE-3I\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:14 -0400",
            "from pps.filterd (m0098394.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7T0E8Mc041503\n\tfor <qemu-devel@nongnu.org>; Mon, 28 Aug 2017 20:16:13 -0400",
            "from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cmsrsj1q9-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Mon, 28 Aug 2017 20:16:13 -0400",
            "from localhost\n\tby e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <mdroth@linux.vnet.ibm.com>;\n\tMon, 28 Aug 2017 20:16:11 -0400",
            "from b01cxnp23034.gho.pok.ibm.com (9.57.198.29)\n\tby e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tMon, 28 Aug 2017 20:16:09 -0400",
            "from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com\n\t[9.57.199.110])\n\tby b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v7T0G9v723331044; Tue, 29 Aug 2017 00:16:09 GMT",
            "from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id A5DB1AE04E;\n\tMon, 28 Aug 2017 20:16:32 -0400 (EDT)",
            "from localhost (unknown [9.80.85.217])\n\tby b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id 783F9AE034;\n\tMon, 28 Aug 2017 20:16:32 -0400 (EDT)"
        ],
        "From": "Michael Roth <mdroth@linux.vnet.ibm.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon, 28 Aug 2017 19:14:18 -0500",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1503965694-10794-1-git-send-email-mdroth@linux.vnet.ibm.com>",
        "References": "<1503965694-10794-1-git-send-email-mdroth@linux.vnet.ibm.com>",
        "X-TM-AS-GCONF": "00",
        "x-cbid": "17082900-0024-0000-0000-000002C6D2AE",
        "X-IBM-SpamModules-Scores": "",
        "X-IBM-SpamModules-Versions": "BY=3.00007630; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00909028; UDB=6.00455849;\n\tIPR=6.00689279; \n\tBA=6.00005557; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016909;\n\tXFM=3.00000015; UTC=2017-08-29 00:16:11",
        "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused",
        "x-cbparentid": "17082900-0025-0000-0000-0000453E6332",
        "Message-Id": "<1503965694-10794-44-git-send-email-mdroth@linux.vnet.ibm.com>",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-28_13:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708290001",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]",
        "X-Received-From": "148.163.156.1",
        "Subject": "[Qemu-devel] [PATCH 43/79] tests: Add coverage for recent block\n\tgeometry fixes",
        "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-stable@nongnu.org, Max Reitz <mreitz@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": "From: Eric Blake <eblake@redhat.com>\n\nUse blkdebug's new geometry constraints to emulate setups that\nhave needed past regression fixes: write zeroes asserting\nwhen running through a loopback block device with max-transfer\nsmaller than cluster size, and discard rounding away portions\nof requests not aligned to preferred boundaries.  Also, add\ncoverage that the block layer is honoring max transfer limits.\n\nFor now, a single iotest performs all actions, with the idea\nthat we can add future blkdebug constraint test cases in the\nsame file; but it can be split into multiple iotests if we find\nreason to run one portion of the test in more setups than what\nare possible in the other.\n\nFor reference, the final portion of the test (checking whether\ndiscard passes as much as possible to the lowest layers of the\nstack) works as follows:\n\nqemu-io: discard 30M at 80000001, passed to blkdebug\n  blkdebug: discard 511 bytes at 80000001, -ENOTSUP (smaller than\nblkdebug's 512 align)\n  blkdebug: discard 14371328 bytes at 80000512, passed to qcow2\n    qcow2: discard 739840 bytes at 80000512, -ENOTSUP (smaller than\nqcow2's 1M align)\n    qcow2: discard 13M bytes at 77M, succeeds\n  blkdebug: discard 15M bytes at 90M, passed to qcow2\n    qcow2: discard 15M bytes at 90M, succeeds\n  blkdebug: discard 1356800 bytes at 105M, passed to qcow2\n    qcow2: discard 1M at 105M, succeeds\n    qcow2: discard 308224 bytes at 106M, -ENOTSUP (smaller than qcow2's\n1M align)\n  blkdebug: discard 1 byte at 111457280, -ENOTSUP (smaller than\nblkdebug's 512 align)\n\nSigned-off-by: Eric Blake <eblake@redhat.com>\nReviewed-by: Max Reitz <mreitz@redhat.com>\nMessage-id: 20170429191419.30051-10-eblake@redhat.com\n[mreitz: For cooperation with image locking, add -r to the qemu-io\n         invocation which verifies the image content]\nSigned-off-by: Max Reitz <mreitz@redhat.com>\n\n(cherry picked from commit 40812d937392fddc11f72a668aef251039cc15ce)\n Conflicts:\n\ttests/qemu-iotests/group\n* dropped context dependency on other test groups\n* prereq for 81c219a\nSigned-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>\n---\n tests/qemu-iotests/177     | 114 +++++++++++++++++++++++++++++++++++++++++++++\n tests/qemu-iotests/177.out |  49 +++++++++++++++++++\n tests/qemu-iotests/group   |   1 +\n 3 files changed, 164 insertions(+)\n create mode 100755 tests/qemu-iotests/177\n create mode 100644 tests/qemu-iotests/177.out",
    "diff": "diff --git a/tests/qemu-iotests/177 b/tests/qemu-iotests/177\nnew file mode 100755\nindex 0000000..2005c17\n--- /dev/null\n+++ b/tests/qemu-iotests/177\n@@ -0,0 +1,114 @@\n+#!/bin/bash\n+#\n+# Test corner cases with unusual block geometries\n+#\n+# Copyright (C) 2016-2017 Red Hat, Inc.\n+#\n+# This program is free software; you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation; either version 2 of the License, or\n+# (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+#\n+\n+# creator\n+owner=eblake@redhat.com\n+\n+seq=`basename $0`\n+echo \"QA output created by $seq\"\n+\n+here=`pwd`\n+status=1\t# failure is the default!\n+\n+_cleanup()\n+{\n+\t_cleanup_test_img\n+}\n+trap \"_cleanup; exit \\$status\" 0 1 2 3 15\n+\n+# get standard environment, filters and checks\n+. ./common.rc\n+. ./common.filter\n+\n+_supported_fmt qcow2\n+_supported_proto file\n+\n+CLUSTER_SIZE=1M\n+size=128M\n+options=driver=blkdebug,image.driver=qcow2\n+\n+echo\n+echo \"== setting up files ==\"\n+\n+TEST_IMG=\"$TEST_IMG.base\" _make_test_img $size\n+$QEMU_IO -c \"write -P 11 0 $size\" \"$TEST_IMG.base\" | _filter_qemu_io\n+_make_test_img -b \"$TEST_IMG.base\"\n+$QEMU_IO -c \"write -P 22 0 $size\" \"$TEST_IMG\" | _filter_qemu_io\n+\n+# Limited to 64k max-transfer\n+echo\n+echo \"== constrained alignment and max-transfer ==\"\n+limits=align=4k,max-transfer=64k\n+$QEMU_IO -c \"open -o $options,$limits blkdebug::$TEST_IMG\" \\\n+         -c \"write -P 33 1000 128k\" -c \"read -P 33 1000 128k\" | _filter_qemu_io\n+\n+echo\n+echo \"== write zero with constrained max-transfer ==\"\n+limits=align=512,max-transfer=64k,opt-write-zero=$CLUSTER_SIZE\n+$QEMU_IO -c \"open -o $options,$limits blkdebug::$TEST_IMG\" \\\n+         -c \"write -z 8003584 2093056\" | _filter_qemu_io\n+\n+# non-power-of-2 write-zero/discard alignments\n+echo\n+echo \"== non-power-of-2 write zeroes limits ==\"\n+\n+limits=align=512,opt-write-zero=15M,max-write-zero=15M,opt-discard=15M,max-discard=15M\n+$QEMU_IO -c \"open -o $options,$limits blkdebug::$TEST_IMG\" \\\n+         -c \"write -z 32M 32M\" | _filter_qemu_io\n+\n+echo\n+echo \"== non-power-of-2 discard limits ==\"\n+\n+limits=align=512,opt-write-zero=15M,max-write-zero=15M,opt-discard=15M,max-discard=15M\n+$QEMU_IO -c \"open -o $options,$limits blkdebug::$TEST_IMG\" \\\n+         -c \"discard 80000001 30M\" | _filter_qemu_io\n+\n+echo\n+echo \"== verify image content ==\"\n+\n+function verify_io()\n+{\n+    if ($QEMU_IMG info -f \"$IMGFMT\" \"$TEST_IMG\" |\n+\t    grep \"compat: 0.10\" > /dev/null); then\n+        # For v2 images, discarded clusters are read from the backing file\n+        discarded=11\n+    else\n+        # Discarded clusters are zeroed for v3 or later\n+        discarded=0\n+    fi\n+\n+    echo read -P 22 0 1000\n+    echo read -P 33 1000 128k\n+    echo read -P 22 132072 7871512\n+    echo read -P 0 8003584 2093056\n+    echo read -P 22 10096640 23457792\n+    echo read -P 0 32M 32M\n+    echo read -P 22 64M 13M\n+    echo read -P $discarded 77M 29M\n+    echo read -P 22 106M 22M\n+}\n+\n+verify_io | $QEMU_IO -r \"$TEST_IMG\" | _filter_qemu_io\n+\n+_check_test_img\n+\n+# success, all done\n+echo \"*** done\"\n+status=0\ndiff --git a/tests/qemu-iotests/177.out b/tests/qemu-iotests/177.out\nnew file mode 100644\nindex 0000000..e887542\n--- /dev/null\n+++ b/tests/qemu-iotests/177.out\n@@ -0,0 +1,49 @@\n+QA output created by 177\n+\n+== setting up files ==\n+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728\n+wrote 134217728/134217728 bytes at offset 0\n+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/t.IMGFMT.base\n+wrote 134217728/134217728 bytes at offset 0\n+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+\n+== constrained alignment and max-transfer ==\n+wrote 131072/131072 bytes at offset 1000\n+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 131072/131072 bytes at offset 1000\n+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+\n+== write zero with constrained max-transfer ==\n+wrote 2093056/2093056 bytes at offset 8003584\n+1.996 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+\n+== non-power-of-2 write zeroes limits ==\n+wrote 33554432/33554432 bytes at offset 33554432\n+32 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+\n+== non-power-of-2 discard limits ==\n+discard 31457280/31457280 bytes at offset 80000001\n+30 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+\n+== verify image content ==\n+read 1000/1000 bytes at offset 0\n+1000 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 131072/131072 bytes at offset 1000\n+128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 7871512/7871512 bytes at offset 132072\n+7.507 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 2093056/2093056 bytes at offset 8003584\n+1.996 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 23457792/23457792 bytes at offset 10096640\n+22.371 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 33554432/33554432 bytes at offset 33554432\n+32 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 13631488/13631488 bytes at offset 67108864\n+13 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 30408704/30408704 bytes at offset 80740352\n+29 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+read 23068672/23068672 bytes at offset 111149056\n+22 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)\n+No errors were found on the image.\n+*** done\ndiff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group\nindex 43142dd..a513ec7 100644\n--- a/tests/qemu-iotests/group\n+++ b/tests/qemu-iotests/group\n@@ -169,3 +169,4 @@\n 174 auto\n 175 auto quick\n 176 rw auto backing\n+177 rw auto quick\n",
    "prefixes": [
        "43/79"
    ]
}