Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623974

[PATCH v2 09/33] block: kill bdev_dax_capable()

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Dan Williams <dan.j.williams@intel.com>
Newsgroups linux.kernel
Subject [PATCH v2 09/33] block: kill bdev_dax_capable()
Date Sat, 15 Apr 2017 04:40:02 +0200
Message-ID <twlN0-WA-3@gated-at.bofh.it> (permalink)
References <twlN0-WA-5@gated-at.bofh.it>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.37,201,1488873600"; d="scan'208";a="74326221"
User-Agent StGit/0.17.1-9-g687f
MIME-Version 1.0
Content-Type text/plain; charset="utf-8"
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 56
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org
X-Original-Date Fri, 14 Apr 2017 19:33:56 -0700
X-Original-Message-ID <149222363616.32363.15616731859270857096.stgit@dwillia2-desk3.amr.corp.intel.com>
X-Original-References <149222358726.32363.15876405696577002849.stgit@dwillia2-desk3.amr.corp.intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1623974

Show key headers only | View raw


This is leftover dead code that has since been replaced by
bdev_dax_supported().

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 fs/block_dev.c         |   24 ------------------------
 include/linux/blkdev.h |    1 -
 2 files changed, 25 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 2eca00ec4370..7f40ea2f0875 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -807,30 +807,6 @@ int bdev_dax_supported(struct super_block *sb, int blocksize)
 }
 EXPORT_SYMBOL_GPL(bdev_dax_supported);
 
-/**
- * bdev_dax_capable() - Return if the raw device is capable for dax
- * @bdev: The device for raw block device access
- */
-bool bdev_dax_capable(struct block_device *bdev)
-{
-	struct blk_dax_ctl dax = {
-		.size = PAGE_SIZE,
-	};
-
-	if (!IS_ENABLED(CONFIG_FS_DAX))
-		return false;
-
-	dax.sector = 0;
-	if (bdev_direct_access(bdev, &dax) < 0)
-		return false;
-
-	dax.sector = bdev->bd_part->nr_sects - (PAGE_SIZE / 512);
-	if (bdev_direct_access(bdev, &dax) < 0)
-		return false;
-
-	return true;
-}
-
 /*
  * pseudo-fs
  */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5a7da607ca04..f72708399b83 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1958,7 +1958,6 @@ extern int bdev_write_page(struct block_device *, sector_t, struct page *,
 						struct writeback_control *);
 extern long bdev_direct_access(struct block_device *, struct blk_dax_ctl *);
 extern int bdev_dax_supported(struct super_block *, int);
-extern bool bdev_dax_capable(struct block_device *);
 #else /* CONFIG_BLOCK */
 
 struct block_device;

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2 09/33] block: kill bdev_dax_capable() Dan Williams <dan.j.williams@intel.com> - 2017-04-15 04:40 +0200

csiph-web