Re: [PATCH v2 3/8] fsdax: zero the edges if source is HOLE or UNWRITTEN

From: Andrew Morton
Date: Thu Dec 01 2022 - 19:39:41 EST


On Thu, 1 Dec 2022 15:58:11 -0800 "Darrick J. Wong" <djwong@xxxxxxxxxx> wrote:

> > --- a/fs/dax.c
> > +++ b/fs/dax.c
> > @@ -1092,7 +1092,7 @@ static int dax_iomap_direct_access(const struct iomap *iomap, loff_t pos,
> > }
> >
> > /**
> > - * dax_iomap_cow_copy - Copy the data from source to destination before write
> > + * dax_iomap_copy_around - Copy the data from source to destination before write
>
> * dax_iomap_copy_around - Prepare for an unaligned write to a
> * shared/cow page by copying the data before and after the range to be
> * written.

Thanks, I added this:

--- a/fs/dax.c~fsdax-zero-the-edges-if-source-is-hole-or-unwritten-fix
+++ a/fs/dax.c
@@ -1092,7 +1092,8 @@ out:
}

/**
- * dax_iomap_copy_around - Copy the data from source to destination before write
+ * dax_iomap_copy_around - Prepare for an unaligned write to a shared/cow page
+ * by copying the data before and after the range to be written.
* @pos: address to do copy from.
* @length: size of copy operation.
* @align_size: aligned w.r.t align_size (either PMD_SIZE or PAGE_SIZE)
_