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

Gao Xiang hsiangkao at linux.alibaba.com
Thu Aug 5 13:24:40 AEST 2021


Hi Chao,

On Thu, Aug 05, 2021 at 11:01:43AM +0800, Chao Yu wrote:
> 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 at lists.linux.dev
> > Cc: linux-fsdevel at vger.kernel.org
> > Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
> > ---
> >   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 at kernel.org>
> 

Thanks, it originally inherited from filesystems/ext2.rst, I will update
this into
dax, dax={always,never}      .....

Since for such image vm-shared memory scenario, no need to add per-file
DAX (at least for now.)

Thanks,
Gao Xiang

> Thanks,


More information about the Linux-erofs mailing list