get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1072860,
    "url": "http://patchwork.ozlabs.org/api/patches/1072860/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20190401140903.19186-11-eblake@redhat.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": "<20190401140903.19186-11-eblake@redhat.com>",
    "list_archive_url": null,
    "date": "2019-04-01T14:08:59",
    "name": "[PULL,10/14] nbd/client: Reject inaccessible tail of inconsistent server",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "09e9a421b0081fb1e22a43dadcec2152799301a5",
    "submitter": {
        "id": 6591,
        "url": "http://patchwork.ozlabs.org/api/people/6591/?format=api",
        "name": "Eric Blake",
        "email": "eblake@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20190401140903.19186-11-eblake@redhat.com/mbox/",
    "series": [
        {
            "id": 100345,
            "url": "http://patchwork.ozlabs.org/api/series/100345/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=100345",
            "date": "2019-04-01T14:08:49",
            "name": "[PULL,01/14] qemu-img: Report bdrv_block_status failures",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/100345/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1072860/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1072860/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=209.51.188.17; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=redhat.com"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 44XvmV45wnz9sPv\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  2 Apr 2019 01:26:47 +1100 (AEDT)",
            "from localhost ([127.0.0.1]:37660 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 1hAxtc-0002WN-Io\n\tfor incoming@patchwork.ozlabs.org; Mon, 01 Apr 2019 10:26:44 -0400",
            "from eggs.gnu.org ([209.51.188.92]:45942)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1hAxco-00025N-H0\n\tfor qemu-devel@nongnu.org; Mon, 01 Apr 2019 10:09:23 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1hAxcm-0004sT-CJ\n\tfor qemu-devel@nongnu.org; Mon, 01 Apr 2019 10:09:22 -0400",
            "from mx1.redhat.com ([209.132.183.28]:40336)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>)\n\tid 1hAxcj-0004nt-9j; Mon, 01 Apr 2019 10:09:17 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 9D21F309267E;\n\tMon,  1 Apr 2019 14:09:16 +0000 (UTC)",
            "from blue.redhat.com (ovpn-116-75.phx2.redhat.com [10.3.116.75])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 3478A19C70;\n\tMon,  1 Apr 2019 14:09:16 +0000 (UTC)"
        ],
        "From": "Eric Blake <eblake@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon,  1 Apr 2019 09:08:59 -0500",
        "Message-Id": "<20190401140903.19186-11-eblake@redhat.com>",
        "In-Reply-To": "<20190401140903.19186-1-eblake@redhat.com>",
        "References": "<20190401140903.19186-1-eblake@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.23",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.43]);\n\tMon, 01 Apr 2019 14:09:16 +0000 (UTC)",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]",
        "X-Received-From": "209.132.183.28",
        "Subject": "[Qemu-devel] [PULL 10/14] nbd/client: Reject inaccessible tail of\n\tinconsistent server",
        "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": "Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,\n\t\"open list:Network Block Dev...\" <qemu-block@nongnu.org>",
        "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": "The NBD spec suggests that a server should never advertise a size\ninconsistent with its minimum block alignment, as that tail is\neffectively inaccessible to a compliant client obeying those block\nconstraints. Since we have a habit of rounding up rather than\ntruncating, to avoid losing the last few bytes of user input, and we\ncannot access the tail when the server advertises bogus block sizing,\nabort the connection to alert the server to fix their bug.  And\nrejecting such servers matches what we already did for a min_block\nthat was not a power of 2 or which was larger than max_block.\n\nDoes not impact either qemu (which always sends properly aligned\nsizes) or nbdkit (which does not send minimum block requirements yet);\nso this is mostly aimed at new NBD server implementations, and ensures\nthat the rest of our code can assume the size is aligned.\n\nSigned-off-by: Eric Blake <eblake@redhat.com>\nMessage-Id: <20190330155704.24191-1-eblake@redhat.com>\nReviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>\n---\n nbd/client.c | 8 ++++++++\n 1 file changed, 8 insertions(+)",
    "diff": "diff --git a/nbd/client.c b/nbd/client.c\nindex de7da48246b..427980bdd22 100644\n--- a/nbd/client.c\n+++ b/nbd/client.c\n@@ -426,6 +426,14 @@ static int nbd_opt_info_or_go(QIOChannel *ioc, uint32_t opt,\n                 nbd_send_opt_abort(ioc);\n                 return -1;\n             }\n+            if (info->min_block &&\n+                !QEMU_IS_ALIGNED(info->size, info->min_block)) {\n+                error_setg(errp, \"export size %\" PRIu64 \"is not multiple of \"\n+                           \"minimum block size %\" PRIu32, info->size,\n+                           info->min_block);\n+                nbd_send_opt_abort(ioc);\n+                return -1;\n+            }\n             trace_nbd_receive_negotiate_size_flags(info->size, info->flags);\n             break;\n\n",
    "prefixes": [
        "PULL",
        "10/14"
    ]
}