Hi, Dan,
On 9/14/2021 9:44 PM, Dan Williams wrote:
On Tue, Sep 14, 2021 at 4:32 PM Jane Chu wrote:
If pwrite(2) encounters poison in a pmem range, it fails with EIO.
This is unecessary if hardware is capable of clearing the poison.
Though not all dax backend hardware has the capability of cl
Replace the existing entry to the newly allocated one in case of CoW.
Also, we mark the entry as PAGECACHE_TAG_TOWRITE so writeback marks this
entry as writeprotected. This helps us snapshots so new write
pagefaults after snapshots trigger a CoW.
Signed-off-by: Goldwyn Rodrigues
Signed-off-by: S
Let dax_iomap_zero() support iter model.
Signed-off-by: Shiyang Ruan
---
fs/dax.c | 3 ++-
fs/iomap/buffered-io.c | 3 +--
include/linux/dax.h| 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 41c93929f20b..4f346e25e488 100644
---
Punch hole on a reflinked file needs dax_iomap_cow_copy() too.
Otherwise, data in not aligned area will be not correct. So, add the
CoW operation for not aligned case in dax_iomap_zero().
Signed-off-by: Shiyang Ruan
Reviewed-by: Ritesh Harjani
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 27 ++
With dax we cannot deal with readpage() etc. So, we create a dax
comparison function which is similar with
vfs_dedupe_file_range_compare().
And introduce dax_remap_file_range_prep() for filesystem use.
Signed-off-by: Goldwyn Rodrigues
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
---
Introduce xfs_mmaplock_two_inodes_and_break_dax_layout() for dax files
who are going to be deduped. After that, call compare range function
only when files are both DAX or not.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
Reviewed-by: Christoph Hellwig
---
fs/xfs/xfs_file.c|
In fsdax mode, WRITE and ZERO on a shared extent need CoW performed.
After that, new allocated extents needs to be remapped to the file.
So, add a CoW identification in ->iomap_begin(), and implement
->iomap_end() to do the remapping work.
Signed-off-by: Shiyang Ruan
---
fs/xfs/xfs_bmap_util.c |
Add address output in dax_iomap_pfn() in order to perform a memcpy() in
CoW case. Since this function both output address and pfn, rename it to
dax_iomap_direct_access().
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Reviewed-by: Ritesh Harjani
Reviewed-by: Dan Williams
---
fs/d
This patchset is attempt to add CoW support for fsdax, and take XFS,
which has both reflink and fsdax feature, as an example.
Changes from V8:
- Rebased on v5.15-rc1
- Patch 4: Add a pre patch to convert dax_iomap_zero to iter model[1]
- Patch 6&7: Remove EXPORT_SYMBOL
- Patch 8: Solve the con
In the case where the iomap is a write operation and iomap is not equal
to srcmap after iomap_begin, we consider it is a CoW operation.
In this case, the destination (iomap->addr) points to a newly allocated
extent. It is needed to copy the data from srcmap to the extent. In
theory, it is better
On Wed, Sep 15, 2021 at 12:22:05AM -0700, Jane Chu wrote:
> Hi, Dan,
>
> On 9/14/2021 9:44 PM, Dan Williams wrote:
> > On Tue, Sep 14, 2021 at 4:32 PM Jane Chu wrote:
> > >
> > > If pwrite(2) encounters poison in a pmem range, it fails with EIO.
> > > This is unecessary if hardware is capable of
On Tue, Sep 14, 2021 at 11:51 PM Justin He wrote:
[..]
> > > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> > > index fb775b967c52..d3a0cec635b1 100644
> > > --- a/drivers/acpi/nfit/core.c
> > > +++ b/drivers/acpi/nfit/core.c
> > > @@ -3005,15 +3005,8 @@ static int acpi_nfit_re
On Wed, Sep 15, 2021 at 9:15 AM Darrick J. Wong wrote:
>
> On Wed, Sep 15, 2021 at 12:22:05AM -0700, Jane Chu wrote:
> > Hi, Dan,
> >
> > On 9/14/2021 9:44 PM, Dan Williams wrote:
> > > On Tue, Sep 14, 2021 at 4:32 PM Jane Chu wrote:
> > > >
> > > > If pwrite(2) encounters poison in a pmem range,
On Wed, Sep 15, 2021 at 01:27:47PM -0700, Dan Williams wrote:
> On Wed, Sep 15, 2021 at 9:15 AM Darrick J. Wong wrote:
> >
> > On Wed, Sep 15, 2021 at 12:22:05AM -0700, Jane Chu wrote:
> > > Hi, Dan,
> > >
> > > On 9/14/2021 9:44 PM, Dan Williams wrote:
> > > > On Tue, Sep 14, 2021 at 4:32 PM Jane
On Wed, Sep 15, 2021 at 06:44:54PM +0800, Shiyang Ruan wrote:
> Add address output in dax_iomap_pfn() in order to perform a memcpy() in
> CoW case. Since this function both output address and pfn, rename it to
> dax_iomap_direct_access().
>
> Signed-off-by: Shiyang Ruan
> Reviewed-by: Christoph
On Wed, Sep 15, 2021 at 06:44:57PM +0800, Shiyang Ruan wrote:
> Let dax_iomap_zero() support iter model.
>
> Signed-off-by: Shiyang Ruan
Oops, I guess we forgot this one when we did the iter conversion last
cycle. :(
Reviewed-by: Darrick J. Wong
--D
> ---
> fs/dax.c | 3 ++-
>
On Wed, Sep 15, 2021 at 06:45:00PM +0800, Shiyang Ruan wrote:
> In fsdax mode, WRITE and ZERO on a shared extent need CoW performed.
> After that, new allocated extents needs to be remapped to the file.
> So, add a CoW identification in ->iomap_begin(), and implement
> ->iomap_end() to do the remap
On Wed, Sep 15, 2021 at 06:45:01PM +0800, Shiyang Ruan wrote:
> Introduce xfs_mmaplock_two_inodes_and_break_dax_layout() for dax files
> who are going to be deduped. After that, call compare range function
> only when files are both DAX or not.
>
> Signed-off-by: Shiyang Ruan
> Reviewed-by: Darr
On 2021/9/16 8:09, Darrick J. Wong wrote:
On Wed, Sep 15, 2021 at 06:44:54PM +0800, Shiyang Ruan wrote:
Add address output in dax_iomap_pfn() in order to perform a memcpy() in
CoW case. Since this function both output address and pfn, rename it to
dax_iomap_direct_access().
Signed-off-by: S
On 2021/9/16 8:30, Darrick J. Wong wrote:
On Wed, Sep 15, 2021 at 06:45:01PM +0800, Shiyang Ruan wrote:
Introduce xfs_mmaplock_two_inodes_and_break_dax_layout() for dax files
who are going to be deduped. After that, call compare range function
only when files are both DAX or not.
Signed-off
On Thu, Sep 16, 2021 at 12:01:18PM +0800, Shiyang Ruan wrote:
>
>
> On 2021/9/16 8:30, Darrick J. Wong wrote:
> > On Wed, Sep 15, 2021 at 06:45:01PM +0800, Shiyang Ruan wrote:
> > > Introduce xfs_mmaplock_two_inodes_and_break_dax_layout() for dax files
> > > who are going to be deduped. After th
On Wed, Sep 15, 2021 at 06:44:58PM +0800, Shiyang Ruan wrote:
> + rc = dax_direct_access(iomap->dax_dev, pgoff, 1, &kaddr, NULL);
> + if (rc < 0)
> + goto out;
> + memset(kaddr + offset, 0, size);
> + if (srcmap->addr != IOMAP_HOLE && srcmap->addr != iomap->addr) {
Shou
Looks good,
Reviewed-by: Christoph Hellwig
> -s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap)
> +s64 dax_iomap_zero(struct iomap_iter *iter, loff_t pos, u64 length)
I think we can also mark the iter const.
Otherwise looks good:
Reviewed-by: Christoph Hellwig
On Wed, Sep 15, 2021 at 06:45:00PM +0800, Shiyang Ruan wrote:
> +static int
> +xfs_dax_write_iomap_end(
> + struct inode*inode,
> + loff_t pos,
> + loff_t length,
> + ssize_t written,
> + unsignedflags
On Wed, Sep 15, 2021 at 05:22:27PM -0700, Darrick J. Wong wrote:
> > xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
> > ret = dax_iomap_fault(vmf, pe_size, &pfn, NULL,
> > (write_fault && !vmf->cow_page) ?
> > -&xfs_dire
26 matches
Mail list logo