|
@@ -18,6 +18,20 @@ struct dax_operations {
|
|
void **, pfn_t *);
|
|
void **, pfn_t *);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_DAX)
|
|
|
|
+struct dax_device *dax_get_by_host(const char *host);
|
|
|
|
+void put_dax(struct dax_device *dax_dev);
|
|
|
|
+#else
|
|
|
|
+static inline struct dax_device *dax_get_by_host(const char *host)
|
|
|
|
+{
|
|
|
|
+ return NULL;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static inline void put_dax(struct dax_device *dax_dev)
|
|
|
|
+{
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+
|
|
int bdev_dax_pgoff(struct block_device *, sector_t, size_t, pgoff_t *pgoff);
|
|
int bdev_dax_pgoff(struct block_device *, sector_t, size_t, pgoff_t *pgoff);
|
|
#if IS_ENABLED(CONFIG_FS_DAX)
|
|
#if IS_ENABLED(CONFIG_FS_DAX)
|
|
int __bdev_dax_supported(struct super_block *sb, int blocksize);
|
|
int __bdev_dax_supported(struct super_block *sb, int blocksize);
|
|
@@ -25,23 +39,29 @@ static inline int bdev_dax_supported(struct super_block *sb, int blocksize)
|
|
{
|
|
{
|
|
return __bdev_dax_supported(sb, blocksize);
|
|
return __bdev_dax_supported(sb, blocksize);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+static inline struct dax_device *fs_dax_get_by_host(const char *host)
|
|
|
|
+{
|
|
|
|
+ return dax_get_by_host(host);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static inline void fs_put_dax(struct dax_device *dax_dev)
|
|
|
|
+{
|
|
|
|
+ put_dax(dax_dev);
|
|
|
|
+}
|
|
|
|
+
|
|
#else
|
|
#else
|
|
static inline int bdev_dax_supported(struct super_block *sb, int blocksize)
|
|
static inline int bdev_dax_supported(struct super_block *sb, int blocksize)
|
|
{
|
|
{
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
}
|
|
}
|
|
-#endif
|
|
|
|
|
|
|
|
-#if IS_ENABLED(CONFIG_DAX)
|
|
|
|
-struct dax_device *dax_get_by_host(const char *host);
|
|
|
|
-void put_dax(struct dax_device *dax_dev);
|
|
|
|
-#else
|
|
|
|
-static inline struct dax_device *dax_get_by_host(const char *host)
|
|
|
|
|
|
+static inline struct dax_device *fs_dax_get_by_host(const char *host)
|
|
{
|
|
{
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
-static inline void put_dax(struct dax_device *dax_dev)
|
|
|
|
|
|
+static inline void fs_put_dax(struct dax_device *dax_dev)
|
|
{
|
|
{
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|