Re: [PATCH v3 2/3] erofs: dax support for non-tailpacking regular file

From: Chao Yu
Date: Wed Aug 04 2021 - 23:01:52 EST


On 2021/8/5 8:36, Gao Xiang wrote:
DAX is quite useful for some VM use cases in order to save guest
memory extremely with minimal lightweight EROFS.

In order to prepare for such use cases, add preliminary dax support
for non-tailpacking regular files for now.

Tested with the DRAM-emulated PMEM and the EROFS image generated by
"mkfs.erofs -Enoinline_data enwik9.fsdax.img enwik9"

Cc: nvdimm@xxxxxxxxxxxxxxx
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
---
Documentation/filesystems/erofs.rst | 2 +
fs/erofs/data.c | 42 +++++++++++++++++++-
fs/erofs/inode.c | 4 ++
fs/erofs/internal.h | 3 ++
fs/erofs/super.c | 59 ++++++++++++++++++++++++++++-
5 files changed, 106 insertions(+), 4 deletions(-)

diff --git a/Documentation/filesystems/erofs.rst b/Documentation/filesystems/erofs.rst
index 832839fcf4c3..ffd2ae7be511 100644
--- a/Documentation/filesystems/erofs.rst
+++ b/Documentation/filesystems/erofs.rst
@@ -84,6 +84,8 @@ cache_strategy=%s Select a strategy for cached decompression from now on:
It still does in-place I/O decompression
for the rest compressed physical clusters.
========== =============================================
+dax Use direct access (no page cache). See

dax or dax=%s

Otherwise, it looks good to me.

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,