Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807874/?format=api
{ "id": 807874, "url": "http://patchwork.ozlabs.org/api/patches/807874/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/150412224334.10177.12994820445044936627.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": "<150412224334.10177.12994820445044936627.stgit@dwillia2-desk3.amr.corp.intel.com>", "list_archive_url": null, "date": "2017-08-30T19:44:03", "name": "[v3,3/4] ext2: perform dax_device lookup at mount", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "b05d72fa5e47bb64c3dac54b0bd8bcc35ac1efd6", "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/150412224334.10177.12994820445044936627.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/807874/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807874/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 3xjGMB2ncLz9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 05:50:30 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751346AbdH3Tu2 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 15:50:28 -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 S1751100AbdH3Tu2 (ORCPT <rfc822;linux-ext4@vger.kernel.org>);\n\tWed, 30 Aug 2017 15:50:28 -0400", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga105.jf.intel.com with ESMTP; 30 Aug 2017 12:50:27 -0700", "from dwillia2-desk3.jf.intel.com (HELO\n\tdwillia2-desk3.amr.corp.intel.com) ([10.54.39.125])\n\tby orsmga004.jf.intel.com with ESMTP; 30 Aug 2017 12:50:27 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.41,449,1498546800\"; d=\"scan'208\";a=\"124134804\"", "Subject": "[PATCH v3 3/4] ext2: 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:03 -0700", "Message-ID": "<150412224334.10177.12994820445044936627.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/ext2/ext2.h | 1 +\n fs/ext2/inode.c | 11 +++--------\n fs/ext2/super.c | 5 +++++\n 3 files changed, 9 insertions(+), 8 deletions(-)", "diff": "diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h\nindex 23ebb92484c6..28de3edd4f4d 100644\n--- a/fs/ext2/ext2.h\n+++ b/fs/ext2/ext2.h\n@@ -114,6 +114,7 @@ struct ext2_sb_info {\n \t */\n \tspinlock_t s_lock;\n \tstruct mb_cache *s_ea_block_cache;\n+\tstruct dax_device *s_daxdev;\n };\n \n static inline spinlock_t *\ndiff --git a/fs/ext2/inode.c b/fs/ext2/inode.c\nindex 30163d007b2f..4dca6f348714 100644\n--- a/fs/ext2/inode.c\n+++ b/fs/ext2/inode.c\n@@ -800,10 +800,10 @@ int ext2_get_block(struct inode *inode, sector_t iblock,\n static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,\n \t\tunsigned flags, struct iomap *iomap)\n {\n-\tstruct block_device *bdev;\n \tunsigned int blkbits = inode->i_blkbits;\n \tunsigned long first_block = offset >> blkbits;\n \tunsigned long max_blocks = (length + (1 << blkbits) - 1) >> blkbits;\n+\tstruct ext2_sb_info *sbi = EXT2_SB(inode->i_sb);\n \tbool new = false, boundary = false;\n \tu32 bno;\n \tint ret;\n@@ -814,13 +814,9 @@ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,\n \t\treturn ret;\n \n \tiomap->flags = 0;\n-\tbdev = inode->i_sb->s_bdev;\n-\tiomap->bdev = bdev;\n+\tiomap->bdev = inode->i_sb->s_bdev;\n \tiomap->offset = (u64)first_block << blkbits;\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->dax_dev = sbi->s_daxdev;\n \n \tif (ret == 0) {\n \t\tiomap->type = IOMAP_HOLE;\n@@ -842,7 +838,6 @@ static int\n ext2_iomap_end(struct inode *inode, loff_t offset, loff_t length,\n \t\tssize_t written, unsigned flags, struct iomap *iomap)\n {\n-\tfs_put_dax(iomap->dax_dev);\n \tif (iomap->type == IOMAP_MAPPED &&\n \t written < length &&\n \t (flags & IOMAP_WRITE))\ndiff --git a/fs/ext2/super.c b/fs/ext2/super.c\nindex 7b1bc9059863..d9dd999568c2 100644\n--- a/fs/ext2/super.c\n+++ b/fs/ext2/super.c\n@@ -144,6 +144,7 @@ static void ext2_put_super (struct super_block * sb)\n \tint db_count;\n \tint i;\n \tstruct ext2_sb_info *sbi = EXT2_SB(sb);\n+\tstruct dax_device *dax_dev = sbi->s_daxdev;\n \n \text2_quota_off_umount(sb);\n \n@@ -172,6 +173,7 @@ static void ext2_put_super (struct super_block * sb)\n \tsb->s_fs_info = NULL;\n \tkfree(sbi->s_blockgroup_lock);\n \tkfree(sbi);\n+\tfs_put_dax(dax_dev);\n }\n \n static struct kmem_cache * ext2_inode_cachep;\n@@ -813,6 +815,7 @@ static unsigned long descriptor_loc(struct super_block *sb,\n \n static int ext2_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 \tstruct buffer_head * bh;\n \tstruct ext2_sb_info * sbi;\n \tstruct ext2_super_block * es;\n@@ -842,6 +845,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)\n \t}\n \tsb->s_fs_info = sbi;\n \tsbi->s_sb_block = sb_block;\n+\tsbi->s_daxdev = dax_dev;\n \n \tspin_lock_init(&sbi->s_lock);\n \n@@ -1200,6 +1204,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)\n \tkfree(sbi->s_blockgroup_lock);\n \tkfree(sbi);\n failed:\n+\tfs_put_dax(dax_dev);\n \treturn ret;\n }\n \n", "prefixes": [ "v3", "3/4" ] }