summaryrefslogtreecommitdiff
path: root/fs/fuse/dax.c
diff options
context:
space:
mode:
authorJane Chu <jane.chu@oracle.com>2022-05-14 01:10:58 +0300
committerDan Williams <dan.j.williams@intel.com>2022-05-16 23:35:56 +0300
commite511c4a3d2a1f64aafc1f5df37a2ffcf7ef91b55 (patch)
treeeccb155ac340c8bd514ab14af30edfc48208b3bd /fs/fuse/dax.c
parent5898b43af954b83c4a4ee4ab85c4dbafa395822a (diff)
downloadlinux-e511c4a3d2a1f64aafc1f5df37a2ffcf7ef91b55.tar.xz
dax: introduce DAX_RECOVERY_WRITE dax access mode
Up till now, dax_direct_access() is used implicitly for normal access, but for the purpose of recovery write, dax range with poison is requested. To make the interface clear, introduce enum dax_access_mode { DAX_ACCESS, DAX_RECOVERY_WRITE, } where DAX_ACCESS is used for normal dax access, and DAX_RECOVERY_WRITE is used for dax recovery write. Suggested-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jane Chu <jane.chu@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Vivek Goyal <vgoyal@redhat.com> Link: https://lore.kernel.org/r/165247982851.52965.11024212198889762949.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'fs/fuse/dax.c')
-rw-r--r--fs/fuse/dax.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index d7d3a7f06862..10eb50cbf398 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -1241,8 +1241,8 @@ static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd)
INIT_DELAYED_WORK(&fcd->free_work, fuse_dax_free_mem_worker);
id = dax_read_lock();
- nr_pages = dax_direct_access(fcd->dev, 0, PHYS_PFN(dax_size), NULL,
- NULL);
+ nr_pages = dax_direct_access(fcd->dev, 0, PHYS_PFN(dax_size),
+ DAX_ACCESS, NULL, NULL);
dax_read_unlock(id);
if (nr_pages < 0) {
pr_debug("dax_direct_access() returned %ld\n", nr_pages);