get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 848,
    "url": "http://patchwork.ozlabs.org/api/patches/848/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20080922195548t-sato@mail.jp.nec.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/projects/8/?format=api",
        "name": "Linux ext4 filesystem development",
        "link_name": "linux-ext4",
        "list_id": "linux-ext4.vger.kernel.org",
        "list_email": "linux-ext4@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20080922195548t-sato@mail.jp.nec.com>",
    "list_archive_url": null,
    "date": "2008-09-22T10:55:48",
    "name": "[PATHC,2/10] ext3: Fix error handling in write_super_lockfs/unlockfs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c13141075667fec42750087a1b5fd518a59cdc0d",
    "submitter": {
        "id": 391,
        "url": "http://patchwork.ozlabs.org/api/people/391/?format=api",
        "name": "Takashi Sato",
        "email": "t-sato@yk.jp.nec.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20080922195548t-sato@mail.jp.nec.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/848/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/848/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-ext4-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id E5AE3DDEE2\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 22 Sep 2008 20:58:24 +1000 (EST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753573AbYIVK6Q (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 06:58:16 -0400",
            "(majordomo@vger.kernel.org) by vger.kernel.org id S1752652AbYIVK6J\n\t(ORCPT <rfc822;linux-ext4-outgoing>);\n\tMon, 22 Sep 2008 06:58:09 -0400",
            "from TYO202.gate.nec.co.jp ([202.32.8.206]:50001 \"EHLO\n\ttyo202.gate.nec.co.jp\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752471AbYIVK6A (ORCPT\n\t<rfc822; linux-ext4@vger.kernel.org>); Mon, 22 Sep 2008 06:58:00 -0400",
            "from mailgate3.nec.co.jp ([10.7.69.162])\n\tby tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m8MAtpDI005496;\n\tMon, 22 Sep 2008 19:55:51 +0900 (JST)",
            "(from root@localhost) by mailgate3.nec.co.jp\n\t(8.11.7/3.7W-MAILGATE-NEC)\n\tid m8MAtpT13057; Mon, 22 Sep 2008 19:55:51 +0900 (JST)",
            "from kuichi.jp.nec.com (kuichi.jp.nec.com [10.26.220.17])\n\tby mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id m8MAtpeS025308;\n\tMon, 22 Sep 2008 19:55:51 +0900 (JST)",
            "from TNESB07336 ([10.64.168.65] [10.64.168.65]) by mail.jp.nec.com\n\twith ESMTP; Mon, 22 Sep 2008 19:55:48 +0900"
        ],
        "To": "Andrew Morton <akpm@linux-foundation.org>,\n\tChristoph Hellwig <hch@infradead.org>,\n\t\"xfs@oss.sgi.com\" <xfs@oss.sgi.com>, \"axboe@kernel.dk\" <axboe@kernel.dk>,\n\t\"mtk.manpages@googlemail.com\" <mtk.manpages@googlemail.com>,\n\t\"linux-fsdevel@vger.kernel.org\" <linux-fsdevel@vger.kernel.org>,\n\t\"dm-devel@redhat.com\" <dm-devel@redhat.com>,\n\t\"viro@ZenIV.linux.org.uk\" <viro@ZenIV.linux.org.uk>,\n\t\"linux-ext4@vger.kernel.org\" <linux-ext4@vger.kernel.org>",
        "Cc": "\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>",
        "Subject": "[PATHC 2/10] ext3: Fix error handling in write_super_lockfs/unlockfs",
        "Message-Id": "<20080922195548t-sato@mail.jp.nec.com>",
        "Mime-Version": "1.0",
        "X-Mailer": "WeMail32[2.51] ID:1K0086",
        "From": "Takashi Sato <t-sato@yk.jp.nec.com>",
        "Date": "Mon, 22 Sep 2008 19:55:48 +0900",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "linux-ext4-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<linux-ext4.vger.kernel.org>",
        "X-Mailing-List": "linux-ext4@vger.kernel.org"
    },
    "content": "I've changed write_super_lockfs/unlockfs so that they return an error\nin case of an I/O failure.\n\nSigned-off-by: Takashi Sato <t-sato@yk.jp.nec.com>\nSigned-off-by: Masayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>\n---\n super.c |   43 +++++++++++++++++++++++++++++--------------\n 1 file changed, 29 insertions(+), 14 deletions(-)\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-ext4\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html",
    "diff": "diff -uprN -X linux-2.6.27-rc7-lockfs-xfs/Documentation/dontdiff linux-2.6.27-rc7-lockfs-xfs/fs/ext3/super.c linux-2.6.2\n7-rc7-lockfs-ext3/fs/ext3/super.c\n--- linux-2.6.27-rc7-lockfs-xfs/fs/ext3/super.c\t2008-09-22 07:29:55.000000000 +0900\n+++ linux-2.6.27-rc7-lockfs-ext3/fs/ext3/super.c\t2008-09-22 10:31:56.000000000 +0900\n@@ -48,8 +48,8 @@ static int ext3_load_journal(struct supe\n \t\t\t     unsigned long journal_devnum);\n static int ext3_create_journal(struct super_block *, struct ext3_super_block *,\n \t\t\t       unsigned int);\n-static void ext3_commit_super (struct super_block * sb,\n-\t\t\t       struct ext3_super_block * es,\n+static int ext3_commit_super(struct super_block *sb,\n+\t\t\t       struct ext3_super_block *es,\n \t\t\t       int sync);\n static void ext3_mark_recovery_complete(struct super_block * sb,\n \t\t\t\t\tstruct ext3_super_block * es);\n@@ -60,9 +60,9 @@ static const char *ext3_decode_error(str\n \t\t\t\t     char nbuf[16]);\n static int ext3_remount (struct super_block * sb, int * flags, char * data);\n static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf);\n-static void ext3_unlockfs(struct super_block *sb);\n+static int ext3_unlockfs(struct super_block *sb);\n static void ext3_write_super (struct super_block * sb);\n-static void ext3_write_super_lockfs(struct super_block *sb);\n+static int ext3_write_super_lockfs(struct super_block *sb);\n \n /*\n  * Wrappers for journal_start/end.\n@@ -2251,21 +2251,23 @@ static int ext3_create_journal(struct su\n \treturn 0;\n }\n \n-static void ext3_commit_super (struct super_block * sb,\n-\t\t\t       struct ext3_super_block * es,\n+static int ext3_commit_super(struct super_block *sb,\n+\t\t\t       struct ext3_super_block *es,\n \t\t\t       int sync)\n {\n \tstruct buffer_head *sbh = EXT3_SB(sb)->s_sbh;\n+\tint error = 0;\n \n \tif (!sbh)\n-\t\treturn;\n+\t\treturn error;\n \tes->s_wtime = cpu_to_le32(get_seconds());\n \tes->s_free_blocks_count = cpu_to_le32(ext3_count_free_blocks(sb));\n \tes->s_free_inodes_count = cpu_to_le32(ext3_count_free_inodes(sb));\n \tBUFFER_TRACE(sbh, \"marking dirty\");\n \tmark_buffer_dirty(sbh);\n \tif (sync)\n-\t\tsync_dirty_buffer(sbh);\n+\t\terror = sync_dirty_buffer(sbh);\n+\treturn error;\n }\n \n \n@@ -2379,37 +2381,50 @@ static int ext3_sync_fs(struct super_blo\n  * LVM calls this function before a (read-only) snapshot is created.  This\n  * gives us a chance to flush the journal completely and mark the fs clean.\n  */\n-static void ext3_write_super_lockfs(struct super_block *sb)\n+static int ext3_write_super_lockfs(struct super_block *sb)\n {\n+\tint error = 0;\n+\tjournal_t *journal;\n \tsb->s_dirt = 0;\n \n \tif (!(sb->s_flags & MS_RDONLY)) {\n-\t\tjournal_t *journal = EXT3_SB(sb)->s_journal;\n+\t\tjournal = EXT3_SB(sb)->s_journal;\n \n \t\t/* Now we set up the journal barrier. */\n \t\tjournal_lock_updates(journal);\n-\t\tjournal_flush(journal);\n+\t\terror = journal_flush(journal);\n+\t\tif (error)\n+\t\t\tgoto out;\n \n \t\t/* Journal blocked and flushed, clear needs_recovery flag. */\n \t\tEXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER);\n-\t\text3_commit_super(sb, EXT3_SB(sb)->s_es, 1);\n+\t\terror = ext3_commit_super(sb, EXT3_SB(sb)->s_es, 1);\n+\t\tif (error)\n+\t\t\tgoto out;\n \t}\n+\treturn 0;\n+\n+out:\n+\tjournal_unlock_updates(journal);\n+\treturn error;\n }\n \n /*\n  * Called by LVM after the snapshot is done.  We need to reset the RECOVER\n  * flag here, even though the filesystem is not technically dirty yet.\n  */\n-static void ext3_unlockfs(struct super_block *sb)\n+static int ext3_unlockfs(struct super_block *sb)\n {\n+\tint error = 0;\n \tif (!(sb->s_flags & MS_RDONLY)) {\n \t\tlock_super(sb);\n \t\t/* Reser the needs_recovery flag before the fs is unlocked. */\n \t\tEXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER);\n-\t\text3_commit_super(sb, EXT3_SB(sb)->s_es, 1);\n+\t\terror = ext3_commit_super(sb, EXT3_SB(sb)->s_es, 1);\n \t\tunlock_super(sb);\n \t\tjournal_unlock_updates(EXT3_SB(sb)->s_journal);\n \t}\n+\treturn error;\n }\n \n static int ext3_remount (struct super_block * sb, int * flags, char * data)\n",
    "prefixes": [
        "PATHC",
        "2/10"
    ]
}