On Thu, 1 Dec 2022 15:58:11 -0800 "Darrick J. Wong" 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 bef
On Thu, Dec 01, 2022 at 03:32:53PM +, Shiyang Ruan wrote:
> Since the basic function for fsdax and reflink has been implemented,
> remove the restrictions of them for widly test.
>
> Signed-off-by: Shiyang Ruan
Looks ok,
Reviewed-by: Darrick J. Wong
--D
> ---
> fs/xfs/xfs_ioctl.c | 4 ---
On Thu, Dec 01, 2022 at 03:32:10PM +, Shiyang Ruan wrote:
> Zero and truncate on a dax file may execute CoW. So use dax ops which
> contains end work for CoW.
>
> Signed-off-by: Shiyang Ruan
LGTM
Reviewed-by: Darrick J. Wong
--D
> ---
> fs/xfs/xfs_iomap.c | 4 ++--
> 1 file changed, 2 i
On Thu, Dec 01, 2022 at 03:31:41PM +, Shiyang Ruan wrote:
> The iomap_iter() on a range of one file may loop more than once. In
> this case, the inner dst_iter can update its iomap but the outer
> src_iter can't. This may cause the wrong remapping in filesystem. Let
> them called at the same
On Thu, Dec 01, 2022 at 03:28:54PM +, Shiyang Ruan wrote:
> If a dax page is shared, mapread at different offsets can also trigger
> page fault on same dax page. So, change the flag from "cow" to
> "shared". And get the shared flag from filesystem when read.
>
> Signed-off-by: Shiyang Ruan
On Thu, Dec 01, 2022 at 03:28:53PM +, Shiyang Ruan wrote:
> If srcmap contains invalid data, such as HOLE and UNWRITTEN, the dest
> page should be zeroed. Otherwise, since it's a pmem, old data may
> remains on the dest page, the result of CoW will be incorrect.
>
> The function name is also
On Thu, Dec 01, 2022 at 11:39:12PM +0800, Shiyang Ruan wrote:
>
>
> 在 2022/12/1 5:08, Darrick J. Wong 写道:
> > On Tue, Nov 29, 2022 at 11:05:30PM -0800, Dan Williams wrote:
> > > Darrick J. Wong wrote:
> > > > On Tue, Nov 29, 2022 at 07:59:14PM -0800, Dan Williams wrote:
> > > > > [ add Andrew ]
>
On Thu, Dec 01, 2022 at 03:28:52PM +, Shiyang Ruan wrote:
> CoW changes the share state of a dax page, but the share count of the
> page isn't updated. The next time access this page, it should have been
> a newly accessed, but old association exists. So, we need to clear the
> share state wh
On Thu, Dec 01, 2022 at 03:28:51PM +, Shiyang Ruan wrote:
> fsdax page is used not only when CoW, but also mapread. To make the it
> easily understood, use 'share' to indicate that the dax page is shared
> by more than one extent. And add helper functions to use it.
>
> Also, the flag needs t
在 2022/12/1 5:08, Darrick J. Wong 写道:
On Tue, Nov 29, 2022 at 11:05:30PM -0800, Dan Williams wrote:
Darrick J. Wong wrote:
On Tue, Nov 29, 2022 at 07:59:14PM -0800, Dan Williams wrote:
[ add Andrew ]
Shiyang Ruan wrote:
Many testcases failed in dax+reflink mode with warning message in dme
Since the basic function for fsdax and reflink has been implemented,
remove the restrictions of them for widly test.
Signed-off-by: Shiyang Ruan
---
fs/xfs/xfs_ioctl.c | 4
fs/xfs/xfs_iops.c | 4
2 files changed, 8 deletions(-)
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
ind
Implement unshare in fsdax mode: copy data from srcmap to iomap.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 52
fs/xfs/xfs_reflink.c | 8 +--
include/linux/dax.h | 2 ++
3 files changed, 60 insertions(+
Zero and truncate on a dax file may execute CoW. So use dax ops which
contains end work for CoW.
Signed-off-by: Shiyang Ruan
---
fs/xfs/xfs_iomap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 881de99766ca..d9401d0300ad 10
The iomap_iter() on a range of one file may loop more than once. In
this case, the inner dst_iter can update its iomap but the outer
src_iter can't. This may cause the wrong remapping in filesystem. Let
them called at the same time.
Signed-off-by: Shiyang Ruan
---
fs/dax.c | 16 --
If a dax page is shared, mapread at different offsets can also trigger
page fault on same dax page. So, change the flag from "cow" to
"shared". And get the shared flag from filesystem when read.
Signed-off-by: Shiyang Ruan
---
fs/dax.c | 19 +++
fs/xfs/xfs_iomap.c |
CoW changes the share state of a dax page, but the share count of the
page isn't updated. The next time access this page, it should have been
a newly accessed, but old association exists. So, we need to clear the
share state when CoW happens, in both dax_iomap_rw() and
dax_zero_iter().
Signed-of
If srcmap contains invalid data, such as HOLE and UNWRITTEN, the dest
page should be zeroed. Otherwise, since it's a pmem, old data may
remains on the dest page, the result of CoW will be incorrect.
The function name is also not easy to understand, rename it to
"dax_iomap_copy_around()", which me
fsdax page is used not only when CoW, but also mapread. To make the it
easily understood, use 'share' to indicate that the dax page is shared
by more than one extent. And add helper functions to use it.
Also, the flag needs to be renamed to PAGE_MAPPING_DAX_SHARED.
Signed-off-by: Shiyang Ruan
-
Changes since v1:
1. Added a snippet of the warning message and some of the failed cases
2. Separated the patch for easily review
3. Added page->share and its helper functions
4. Included the patch[1] that removes the restrictions of fsdax and reflink
[1]
https://lore.kernel.org/linux-xfs/1663
19 matches
Mail list logo