|
@@ -46,6 +46,8 @@ void dax_read_unlock(int id)
|
|
|
EXPORT_SYMBOL_GPL(dax_read_unlock);
|
|
|
|
|
|
#ifdef CONFIG_BLOCK
|
|
|
+#include <linux/blkdev.h>
|
|
|
+
|
|
|
int bdev_dax_pgoff(struct block_device *bdev, sector_t sector, size_t size,
|
|
|
pgoff_t *pgoff)
|
|
|
{
|
|
@@ -59,6 +61,14 @@ int bdev_dax_pgoff(struct block_device *bdev, sector_t sector, size_t size,
|
|
|
}
|
|
|
EXPORT_SYMBOL(bdev_dax_pgoff);
|
|
|
|
|
|
+struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev)
|
|
|
+{
|
|
|
+ if (!blk_queue_dax(bdev->bd_queue))
|
|
|
+ return NULL;
|
|
|
+ return fs_dax_get_by_host(bdev->bd_disk->disk_name);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev);
|
|
|
+
|
|
|
/**
|
|
|
* __bdev_dax_supported() - Check if the device supports dax for filesystem
|
|
|
* @sb: The superblock of the device
|