get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807875,
    "url": "http://patchwork.ozlabs.org/api/patches/807875/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/150412224853.10177.6213990706281408829.stgit@dwillia2-desk3.amr.corp.intel.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": "<150412224853.10177.6213990706281408829.stgit@dwillia2-desk3.amr.corp.intel.com>",
    "list_archive_url": null,
    "date": "2017-08-30T19:44:08",
    "name": "[v3,4/4] ext4: perform dax_device lookup at mount",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "1dfbcdf98ec1c307b98acf7e3c536c4d9ccc1b6f",
    "submitter": {
        "id": 347,
        "url": "http://patchwork.ozlabs.org/api/people/347/?format=api",
        "name": "Dan Williams",
        "email": "dan.j.williams@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/150412224853.10177.6213990706281408829.stgit@dwillia2-desk3.amr.corp.intel.com/mbox/",
    "series": [
        {
            "id": 694,
            "url": "http://patchwork.ozlabs.org/api/series/694/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=694",
            "date": "2017-08-30T19:43:47",
            "name": "fs, dax: lookup dax_device at mount time",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/694/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807875/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807875/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",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-ext4-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjGMH5QP4z9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 05:50:35 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751330AbdH3Tud (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 15:50:33 -0400",
            "from mga07.intel.com ([134.134.136.100]:37320 \"EHLO\n\tmga07.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750851AbdH3Tud (ORCPT <rfc822;linux-ext4@vger.kernel.org>);\n\tWed, 30 Aug 2017 15:50:33 -0400",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga105.jf.intel.com with ESMTP; 30 Aug 2017 12:50:32 -0700",
            "from dwillia2-desk3.jf.intel.com (HELO\n\tdwillia2-desk3.amr.corp.intel.com) ([10.54.39.125])\n\tby fmsmga006.fm.intel.com with ESMTP; 30 Aug 2017 12:50:32 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,449,1498546800\"; d=\"scan'208\";a=\"146423594\"",
        "Subject": "[PATCH v3 4/4] ext4: perform dax_device lookup at mount",
        "From": "Dan Williams <dan.j.williams@intel.com>",
        "To": "linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org",
        "Cc": "Jan Kara <jack@suse.cz>, linux-nvdimm@lists.01.org,\n\tAndreas Dilger <adilger.kernel@dilger.ca>,\n\tTheodore Ts'o <tytso@mit.edu>, Christoph Hellwig <hch@lst.de>",
        "Date": "Wed, 30 Aug 2017 12:44:08 -0700",
        "Message-ID": "<150412224853.10177.6213990706281408829.stgit@dwillia2-desk3.amr.corp.intel.com>",
        "In-Reply-To": "<150412222686.10177.8031279869867070772.stgit@dwillia2-desk3.amr.corp.intel.com>",
        "References": "<150412222686.10177.8031279869867070772.stgit@dwillia2-desk3.amr.corp.intel.com>",
        "User-Agent": "StGit/0.17.1-9-g687f",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "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": "The ->iomap_begin() operation is a hot path, so cache the\nfs_dax_get_by_host() result at mount time to avoid the incurring the\nhash lookup overhead on a per-i/o basis.\n\nCc: \"Theodore Ts'o\" <tytso@mit.edu>\nCc: Andreas Dilger <adilger.kernel@dilger.ca>\nCc: Jan Kara <jack@suse.cz>\nReported-by: Christoph Hellwig <hch@lst.de>\nSigned-off-by: Dan Williams <dan.j.williams@intel.com>\n---\n fs/ext4/ext4.h  |    1 +\n fs/ext4/inode.c |   11 +++--------\n fs/ext4/super.c |    5 +++++\n 3 files changed, 9 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h\nindex a2bb7d2870e4..194e622dc3dd 100644\n--- a/fs/ext4/ext4.h\n+++ b/fs/ext4/ext4.h\n@@ -1528,6 +1528,7 @@ struct ext4_sb_info {\n \n \t/* Barrier between changing inodes' journal flags and writepages ops. */\n \tstruct percpu_rw_semaphore s_journal_flag_rwsem;\n+\tstruct dax_device *s_daxdev;\n };\n \n static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)\ndiff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex c774bdc22759..16424b5c4e88 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -3404,7 +3404,7 @@ static int ext4_releasepage(struct page *page, gfp_t wait)\n static int ext4_iomap_begin(struct inode *inode, loff_t offset, loff_t length,\n \t\t\t    unsigned flags, struct iomap *iomap)\n {\n-\tstruct block_device *bdev;\n+\tstruct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);\n \tunsigned int blkbits = inode->i_blkbits;\n \tunsigned long first_block = offset >> blkbits;\n \tunsigned long last_block = (offset + length - 1) >> blkbits;\n@@ -3473,12 +3473,8 @@ static int ext4_iomap_begin(struct inode *inode, loff_t offset, loff_t length,\n \t}\n \n \tiomap->flags = 0;\n-\tbdev = inode->i_sb->s_bdev;\n-\tiomap->bdev = bdev;\n-\tif (blk_queue_dax(bdev->bd_queue))\n-\t\tiomap->dax_dev = fs_dax_get_by_host(bdev->bd_disk->disk_name);\n-\telse\n-\t\tiomap->dax_dev = NULL;\n+\tiomap->bdev = inode->i_sb->s_bdev;\n+\tiomap->dax_dev = sbi->s_daxdev;\n \tiomap->offset = first_block << blkbits;\n \n \tif (ret == 0) {\n@@ -3511,7 +3507,6 @@ static int ext4_iomap_end(struct inode *inode, loff_t offset, loff_t length,\n \tint blkbits = inode->i_blkbits;\n \tbool truncate = false;\n \n-\tfs_put_dax(iomap->dax_dev);\n \tif (!(flags & IOMAP_WRITE) || (flags & IOMAP_FAULT))\n \t\treturn 0;\n \ndiff --git a/fs/ext4/super.c b/fs/ext4/super.c\nindex d61a70e2193a..0b3d94e25efb 100644\n--- a/fs/ext4/super.c\n+++ b/fs/ext4/super.c\n@@ -864,6 +864,7 @@ static inline void ext4_quota_off_umount(struct super_block *sb)\n static void ext4_put_super(struct super_block *sb)\n {\n \tstruct ext4_sb_info *sbi = EXT4_SB(sb);\n+\tstruct dax_device *dax_dev = sbi->s_daxdev;\n \tstruct ext4_super_block *es = sbi->s_es;\n \tint aborted = 0;\n \tint i, err;\n@@ -952,6 +953,7 @@ static void ext4_put_super(struct super_block *sb)\n \t\tcrypto_free_shash(sbi->s_chksum_driver);\n \tkfree(sbi->s_blockgroup_lock);\n \tkfree(sbi);\n+\tfs_put_dax(dax_dev);\n }\n \n static struct kmem_cache *ext4_inode_cachep;\n@@ -3377,6 +3379,7 @@ static void ext4_set_resv_clusters(struct super_block *sb)\n \n static int ext4_fill_super(struct super_block *sb, void *data, int silent)\n {\n+\tstruct dax_device *dax_dev = fs_dax_get_by_bdev(sb->s_bdev);\n \tchar *orig_data = kstrdup(data, GFP_KERNEL);\n \tstruct buffer_head *bh;\n \tstruct ext4_super_block *es = NULL;\n@@ -3399,6 +3402,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)\n \tunsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;\n \text4_group_t first_not_zeroed;\n \n+\tsbi->s_daxdev = dax_dev;\n \tif ((data && !orig_data) || !sbi)\n \t\tgoto out_free_base;\n \n@@ -4378,6 +4382,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)\n out_free_base:\n \tkfree(sbi);\n \tkfree(orig_data);\n+\tfs_put_dax(dax_dev);\n \treturn err ? err : ret;\n }\n \n",
    "prefixes": [
        "v3",
        "4/4"
    ]
}