Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807872/?format=api
{ "id": 807872, "url": "http://patchwork.ozlabs.org/api/patches/807872/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/150412223265.10177.11004612169458058274.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": "<150412223265.10177.11004612169458058274.stgit@dwillia2-desk3.amr.corp.intel.com>", "list_archive_url": null, "date": "2017-08-30T19:43:52", "name": "[v3,1/4] dax: introduce a fs_dax_get_by_bdev() helper", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "732faeb7d57cc432350cdded3bdb8a1a5f8d28cd", "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/150412223265.10177.11004612169458058274.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/807872/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807872/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 3xjGLz4zXdz9sP5\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 05:50:19 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750941AbdH3TuR (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 15:50:17 -0400", "from mga14.intel.com ([192.55.52.115]:52986 \"EHLO mga14.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750758AbdH3TuR (ORCPT <rfc822;linux-ext4@vger.kernel.org>);\n\tWed, 30 Aug 2017 15:50:17 -0400", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Aug 2017 12:50:16 -0700", "from dwillia2-desk3.jf.intel.com (HELO\n\tdwillia2-desk3.amr.corp.intel.com) ([10.54.39.125])\n\tby fmsmga001.fm.intel.com with ESMTP; 30 Aug 2017 12:50:16 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.41,449,1498546800\"; d=\"scan'208\";a=\"1189933338\"", "Subject": "[PATCH v3 1/4] dax: introduce a fs_dax_get_by_bdev() helper", "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>, Christoph Hellwig <hch@lst.de>,\n\tlinux-nvdimm@lists.01.org", "Date": "Wed, 30 Aug 2017 12:43:52 -0700", "Message-ID": "<150412223265.10177.11004612169458058274.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": "Add a helper that can replace the following common pattern:\n\n\tif (blk_queue_dax(bdev->bd_queue))\n\t\tfs_dax_get_by_host(bdev->bd_disk->disk_name);\n\nThis will be used to move dax_device lookup from iomap-operation time to\nfs-mount time.\n\nCc: Jan Kara <jack@suse.cz>\nCc: Christoph Hellwig <hch@lst.de>\nSigned-off-by: Dan Williams <dan.j.williams@intel.com>\n---\n drivers/dax/super.c | 10 ++++++++++\n include/linux/dax.h | 6 ++++++\n 2 files changed, 16 insertions(+)", "diff": "diff --git a/drivers/dax/super.c b/drivers/dax/super.c\nindex 938eb4868f7f..b699aac268a6 100644\n--- a/drivers/dax/super.c\n+++ b/drivers/dax/super.c\n@@ -46,6 +46,8 @@ void dax_read_unlock(int id)\n EXPORT_SYMBOL_GPL(dax_read_unlock);\n \n #ifdef CONFIG_BLOCK\n+#include <linux/blkdev.h>\n+\n int bdev_dax_pgoff(struct block_device *bdev, sector_t sector, size_t size,\n \t\tpgoff_t *pgoff)\n {\n@@ -59,6 +61,14 @@ int bdev_dax_pgoff(struct block_device *bdev, sector_t sector, size_t size,\n }\n EXPORT_SYMBOL(bdev_dax_pgoff);\n \n+struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev)\n+{\n+\tif (!blk_queue_dax(bdev->bd_queue))\n+\t\treturn NULL;\n+\treturn fs_dax_get_by_host(bdev->bd_disk->disk_name);\n+}\n+EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev);\n+\n /**\n * __bdev_dax_supported() - Check if the device supports dax for filesystem\n * @sb: The superblock of the device\ndiff --git a/include/linux/dax.h b/include/linux/dax.h\nindex df97b7af7e2c..ac8afa18f707 100644\n--- a/include/linux/dax.h\n+++ b/include/linux/dax.h\n@@ -57,6 +57,7 @@ static inline void fs_put_dax(struct dax_device *dax_dev)\n \tput_dax(dax_dev);\n }\n \n+struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev);\n #else\n static inline int bdev_dax_supported(struct super_block *sb, int blocksize)\n {\n@@ -71,6 +72,11 @@ static inline struct dax_device *fs_dax_get_by_host(const char *host)\n static inline void fs_put_dax(struct dax_device *dax_dev)\n {\n }\n+\n+static inline struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev)\n+{\n+\treturn NULL;\n+}\n #endif\n \n int dax_read_lock(void);\n", "prefixes": [ "v3", "1/4" ] }