* [PATCH 2/3] f2fs:dax: Export interfaces: dax_map/unmap_atomic()
@ 2017-05-04 0:17 sunqiuyang
0 siblings, 0 replies; only message in thread
From: sunqiuyang @ 2017-05-04 0:17 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel
Cc: miaoxie, zhaohongjiang, fangwei1, wangyijing, yi.zhang, guzheng1,
dingxiang, houtao1, yanaijie, wenyuzhong1, wangxiaojun11,
sunqiuyang
Export interfaces of dax_map/unmap_atomic() for usage in moving data
pages of DAX files in garbage collection of F2FS.
Signed-off-by: Qiuyang Sun <sunqiuyang@huawei.com>
---
fs/dax.c | 6 ++++--
include/linux/dax.h | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 85abd74..615a4c1 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -55,7 +55,7 @@ static int __init init_dax_wait_table(void)
}
fs_initcall(init_dax_wait_table);
-static long dax_map_atomic(struct block_device *bdev, struct blk_dax_ctl *dax)
+long dax_map_atomic(struct block_device *bdev, struct blk_dax_ctl *dax)
{
struct request_queue *q = bdev->bd_queue;
long rc = -EIO;
@@ -72,14 +72,16 @@ static long dax_map_atomic(struct block_device *bdev, struct blk_dax_ctl *dax)
}
return rc;
}
+EXPORT_SYMBOL_GPL(dax_map_atomic);
-static void dax_unmap_atomic(struct block_device *bdev,
+void dax_unmap_atomic(struct block_device *bdev,
const struct blk_dax_ctl *dax)
{
if (IS_ERR(dax->addr))
return;
blk_queue_exit(bdev->bd_queue);
}
+EXPORT_SYMBOL_GPL(dax_unmap_atomic);
static int dax_is_pmd_entry(void *entry)
{
diff --git a/include/linux/dax.h b/include/linux/dax.h
index d8a3dc0..b6451b2 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -7,6 +7,7 @@
#include <asm/pgtable.h>
struct iomap_ops;
+struct blk_dax_ctl;
/*
* We use lowest available bit in exceptional entry for locking, one bit for
@@ -36,6 +37,8 @@ static inline void *dax_radix_locked_entry(sector_t sector, unsigned long flags)
RADIX_DAX_ENTRY_LOCK);
}
+long dax_map_atomic(struct block_device *bdev, struct blk_dax_ctl *dax);
+void dax_unmap_atomic(struct block_device *bdev, const struct blk_dax_ctl *dax);
ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
const struct iomap_ops *ops);
int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size,
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-04 0:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 0:17 [PATCH 2/3] f2fs:dax: Export interfaces: dax_map/unmap_atomic() sunqiuyang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).