Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/812697/?format=api
{ "id": 812697, "url": "http://patchwork.ozlabs.org/api/patches/812697/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20170912050526.7627-5-ross.zwisler@linux.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": "<20170912050526.7627-5-ross.zwisler@linux.intel.com>", "list_archive_url": null, "date": "2017-09-12T05:05:25", "name": "[v2,4/5] ext4: add ext4_should_use_dax()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "19b0f039e17cb06a0802f8881d9f10df0258be43", "submitter": { "id": 46514, "url": "http://patchwork.ozlabs.org/api/people/46514/?format=api", "name": "Ross Zwisler", "email": "ross.zwisler@linux.intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20170912050526.7627-5-ross.zwisler@linux.intel.com/mbox/", "series": [ { "id": 2615, "url": "http://patchwork.ozlabs.org/api/series/2615/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=2615", "date": "2017-09-12T05:05:23", "name": "ext4: DAX data corruption fixes", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/2615/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/812697/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/812697/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 3xrt734N8sz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 12 Sep 2017 15:06:23 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751457AbdILFGH (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 12 Sep 2017 01:06:07 -0400", "from mga11.intel.com ([192.55.52.93]:12365 \"EHLO mga11.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751313AbdILFFf (ORCPT <rfc822;linux-ext4@vger.kernel.org>);\n\tTue, 12 Sep 2017 01:05:35 -0400", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Sep 2017 22:05:34 -0700", "from theros.lm.intel.com ([10.232.112.77])\n\tby FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2017 22:05:33 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.42,381,1500966000\"; d=\"scan'208\";a=\"899352303\"", "From": "Ross Zwisler <ross.zwisler@linux.intel.com>", "To": "\"Theodore Ts'o\" <tytso@mit.edu>, Jan Kara <jack@suse.cz>,\n\tlinux-kernel@vger.kernel.org", "Cc": "Ross Zwisler <ross.zwisler@linux.intel.com>,\n\tAndreas Dilger <adilger.kernel@dilger.ca>,\n\tChristoph Hellwig <hch@lst.de>, Dan Williams <dan.j.williams@intel.com>,\n\tDave Chinner <david@fromorbit.com>, linux-ext4@vger.kernel.org,\n\tlinux-nvdimm@lists.01.org", "Subject": "[PATCH v2 4/5] ext4: add ext4_should_use_dax()", "Date": "Mon, 11 Sep 2017 23:05:25 -0600", "Message-Id": "<20170912050526.7627-5-ross.zwisler@linux.intel.com>", "X-Mailer": "git-send-email 2.9.5", "In-Reply-To": "<20170912050526.7627-1-ross.zwisler@linux.intel.com>", "References": "<20170912050526.7627-1-ross.zwisler@linux.intel.com>", "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": "This helper, in the spirit of ext4_should_dioread_nolock() et al., replaces\nthe complex conditional in ext4_set_inode_flags().\n\nSigned-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>\n---\n fs/ext4/inode.c | 19 ++++++++++++++++---\n 1 file changed, 16 insertions(+), 3 deletions(-)", "diff": "diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c\nindex 3207333..525dd63 100644\n--- a/fs/ext4/inode.c\n+++ b/fs/ext4/inode.c\n@@ -4577,6 +4577,21 @@ int ext4_get_inode_loc(struct inode *inode, struct ext4_iloc *iloc)\n \t\t!ext4_test_inode_state(inode, EXT4_STATE_XATTR));\n }\n \n+static bool ext4_should_use_dax(struct inode *inode)\n+{\n+\tif (!test_opt(inode->i_sb, DAX))\n+\t\treturn false;\n+\tif (!S_ISREG(inode->i_mode))\n+\t\treturn false;\n+\tif (ext4_should_journal_data(inode))\n+\t\treturn false;\n+\tif (ext4_has_inline_data(inode))\n+\t\treturn false;\n+\tif (ext4_encrypted_inode(inode))\n+\t\treturn false;\n+\treturn true;\n+}\n+\n void ext4_set_inode_flags(struct inode *inode)\n {\n \tunsigned int flags = EXT4_I(inode)->i_flags;\n@@ -4592,9 +4607,7 @@ void ext4_set_inode_flags(struct inode *inode)\n \t\tnew_fl |= S_NOATIME;\n \tif (flags & EXT4_DIRSYNC_FL)\n \t\tnew_fl |= S_DIRSYNC;\n-\tif (test_opt(inode->i_sb, DAX) && S_ISREG(inode->i_mode) &&\n-\t !ext4_should_journal_data(inode) && !ext4_has_inline_data(inode) &&\n-\t !ext4_encrypted_inode(inode))\n+\tif (ext4_should_use_dax(inode))\n \t\tnew_fl |= S_DAX;\n \tinode_set_flags(inode, new_fl,\n \t\t\tS_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_DAX);\n", "prefixes": [ "v2", "4/5" ] }