On 2021/8/23 20:57, Christoph Hellwig wrote:
On Thu, Aug 19, 2021 at 03:54:01PM -0700, Dan Williams wrote:
static void *dax_insert_entry(struct xa_state *xas, struct vm_fault *vmf,
const struct iomap_iter *iter, void
*entry, pfn_t pfn,
On 2021/8/20 10:39, Dan Williams wrote:
On Sun, Aug 15, 2021 at 11:04 PM Shiyang Ruan wrote:
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
srcmap to dax_iomap_zero() and replace memset() as
On 2021/8/20 23:18, Dan Williams wrote:
On Thu, Aug 19, 2021 at 11:13 PM ruansy.fnst wrote:
On 2021/8/20 上午11:01, Dan Williams wrote:
On Sun, Aug 15, 2021 at 11:05 PM Shiyang Ruan wrote:
After writing data, reflink requires end operations to remap those new
allocated extents. The
On 2021/8/20 11:08, Dan Williams wrote:
On Sun, Aug 15, 2021 at 11:05 PM 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
On 2021/8/27 13:00, Dan Williams wrote:
On Thu, Aug 26, 2021 at 8:22 PM Shiyang Ruan wrote:
On 2021/8/23 20:57, Christoph Hellwig wrote:
On Thu, Aug 19, 2021 at 03:54:01PM -0700, Dan Williams wrote:
static void *dax_insert_entry(struct xa_state *xas, struct vm_fault *vmf
On 2021/8/27 13:04, Dan Williams wrote:
On Thu, Aug 26, 2021 at 8:30 PM Shiyang Ruan wrote:
On 2021/8/20 23:18, Dan Williams wrote:
On Thu, Aug 19, 2021 at 11:13 PM ruansy.fnst wrote:
On 2021/8/20 上午11:01, Dan Williams wrote:
On Sun, Aug 15, 2021 at 11:05 PM 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 Hellwig
Reviewed-by: Ritesh Harjani
Reviewed-by: Dan Williams
---
fs
ented in fsdax, we are able to make reflink
and fsdax work together in XFS.
(Rebased on v5.14-rc4 and Christoph's "switch iomap to an iterator model v2"[1])
[1]: https://lore.kernel.org/linux-xfs/20210809061244.1196573-1-...@lst.de/
==
Shiyang Ruan (7):
fsdax: Output address in dax_io
is better to copy the head and tail ranges which is outside
of the non-aligned area instead of copying the whole aligned range. But
in dax page fault, it will always be an aligned range. So copy the whole
range in this case.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Reviewed-by: Darr
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
srcmap to dax_iomap_zero() and replace memset() as dax_iomap_cow_copy().
Signed-off-by: Shiyang Ruan
Reviewed-by: Ritesh Harjani
Reviewed-by: Darrick J. Wong
-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Reviewed-by: Ritesh Harjani
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 73 +++-
1 file changed, 40 insertions(+), 33 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 792116b14782
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
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. Add
an implementation of ->iomap_end() for dax write ops to do the remapping
work.
Signed-off-by: Shiyang Ruan
---
fs/dax.c |
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
---
fs/xfs/xfs_file.c| 2 +-
fs/xfs/xfs_inode.c | 57
: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Reviewed-by: Ritesh Harjani
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 73 +++-
1 file changed, 40 insertions(+), 33 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index dded08be54dc..41c93929f20b
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_
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
flink
and fsdax work together in XFS.
(Rebased on v5.15-rc1)
==
Shiyang Ruan (8):
fsdax: Output address in dax_iomap_pfn() and rename it
fsdax: Introduce dax_iomap_cow_copy()
fsdax: Replace mmap entry in case of CoW
fsdax: Convert dax_iomap_zero to iter model
fsdax: Add dax_iomap_cow_c
is better to copy the head and tail ranges which is outside
of the non-aligned area instead of copying the whole aligned range. But
in dax page fault, it will always be an aligned range. So copy the whole
range in this case.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
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
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
On 2021/9/16 14:16, Christoph Hellwig wrote:
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 (sr
On 2021/9/16 14:23, Christoph Hellwig wrote:
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
.
Signed-off-by: Shiyang Ruan
---
fs/dax.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 2536c105ec7f..1a57211b1bc9 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -352,9 +352,10 @@ static void dax_associate_entry(void *entry, struct
mapped into their address spaces, but
future patches could actually do something about corrupt metadata.
After that, the memory failure needs to notify the processes who are
using those files.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 19 +
fs/xfs/xfs_fsops.c | 3 +
fs/xfs
ata, call mf_dax_kill_procs()
|* normal case
|-
mf_generic_kill_procs()
The fsdax & reflink support for XFS is not contained in this patchset.
(Rebased on v5.15-rc1)
==
Shiyang Ruan (8):
dax: Use rwsem for dax_{read,write}_lock()
dax: Introduce holder for dax_device
mm: factor helpers for memo
memory_failure_dev_pagemap code is a bit complex before introduce RMAP
feature for fsdax. So it is needed to factor some helper functions to
simplify these code.
Signed-off-by: Shiyang Ruan
---
mm/memory-failure.c | 140
1 file changed, 76
filesystem is being mounted,
or an target device is being activated.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 59 +
include/linux/dax.h | 29 ++
2 files changed, 88 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax
memory failure
from pmem driver to upper layers. If there is something not support in
the notify routine, memory_failure will fall back to the generic hanlder.
Signed-off-by: Shiyang Ruan
---
drivers/nvdimm/pmem.c| 11 +++
include/linux/memremap.h | 9 +
mm/memory-failure.c
for registration.
Signed-off-by: Shiyang Ruan
---
drivers/dax/device.c | 11 +-
drivers/dax/super.c| 43 ++
drivers/md/dm-writecache.c | 7 +++
fs/dax.c | 26 +++
include/linux/dax.h| 9
r use.
Signed-off-by: Shiyang Ruan
---
fs/dax.c| 65 -
include/linux/dax.h | 15 +++
2 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index 798c43f09eee..509b65e60478 100644
--- a/fs/dax.c
+++ b/fs/
ppings and offsets may share the same page in fsdax
mode. So, it is called when filesystem RMAP results are found.
Signed-off-by: Shiyang Ruan
---
fs/dax.c| 10 --
include/linux/dax.h | 9 +
include/linux/mm.h | 2 ++
mm/memory-fail
access support.
With the two mechanisms implemented in fsdax, we are able to make reflink
and fsdax work together in XFS.
(Rebased on v5.15-rc3)
==
Shiyang Ruan (8):
fsdax: Output address in dax_iomap_pfn() and rename it
fsdax: Introduce dax_iomap_cow_copy()
fsdax: Replace mmap entry in case
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
Reviewed
is better to copy the head and tail ranges which is outside
of the non-aligned area instead of copying the whole aligned range. But
in dax page fault, it will always be an aligned range. So copy the whole
range in this case.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Reviewed-by: Darr
: Shiyang Ruan
Reviewed-by: Christoph Hellwig
Reviewed-by: Ritesh Harjani
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 75 +++-
1 file changed, 41 insertions(+), 34 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index dded08be54dc..b437badfe0dd
Let dax_iomap_zero() support iter model.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
Reviewed-by: Christoph Hellwig
---
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
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
Reviewed-by
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
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_
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
在 2021/10/15 1:48, Darrick J. Wong 写道:
On Fri, Sep 24, 2021 at 09:09:52PM +0800, Shiyang Ruan wrote:
In order to introduce dax holder registration, we need a write lock for
dax. Because of the rarity of notification failures and the infrequency
of registration events, it would be better to
在 2021/10/15 2:05, Darrick J. Wong 写道:
On Fri, Sep 24, 2021 at 09:09:55PM +0800, Shiyang Ruan wrote:
When memory-failure occurs, we call this function which is implemented
by each kind of devices. For the fsdax case, pmem device driver
implements it. Pmem device driver will find out the
在 2021/10/15 3:32, Darrick J. Wong 写道:
On Fri, Sep 24, 2021 at 09:09:57PM +0800, Shiyang Ruan wrote:
This function is called at the end of RMAP routine, i.e. filesystem
recovery function, to collect and kill processes using a shared page of
DAX file. The difference between
在 2021/10/15 2:00, Darrick J. Wong 写道:
On Fri, Sep 24, 2021 at 09:09:53PM +0800, Shiyang Ruan wrote:
To easily track filesystem from a pmem device, we introduce a holder for
dax_device structure, and also its operation. This holder is used to
remember who is using this dax_device:
- When
ppings and offsets may share the same page in fsdax
mode. So, it is called when filesystem RMAP results are found.
Signed-off-by: Shiyang Ruan
---
fs/dax.c| 10 --
include/linux/dax.h | 9 +
include/linux/mm.h | 2 ++
mm/memory-fail
memory failure
from pmem driver to upper layers. If there is something not support in
the notify routine, memory_failure will fall back to the generic hanlder.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c| 11 +++
include/linux/memremap.h
memory_failure_dev_pagemap code is a bit complex before introduce RMAP
feature for fsdax. So it is needed to factor some helper functions to
simplify these code.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
Reviewed-by: Christoph Hellwig
---
mm/memory-failure.c | 141
mapped into their address spaces, but
future patches could actually do something about corrupt metadata.
After that, the memory failure needs to notify the processes who are
using those files.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 19
fs/xfs/xfs_fsops.c | 3 +
fs/xfs
r use.
Signed-off-by: Shiyang Ruan
---
fs/dax.c| 65 -
include/linux/dax.h | 15 +++
2 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index a06cbb950950..59e02c9f169c 100644
--- a/fs/dax.c
+++ b/fs/
, which is set true when it is CoW operation, for reflink
case. Normal cases work as before.
We will get the cow flag in the dax-reflink(v10) patchset. So, always
set false here for now.
Signed-off-by: Shiyang Ruan
---
fs/dax.c | 39 +++
1 file changed, 27
le data
| | try to recover data, call mf_dax_kill_procs()
|* normal case
|-
mf_generic_kill_procs()
The fsdax & reflink support for XFS is not contained in this patchset.
(Rebased on v5.15-rc7)
==
Shiyang Ruan (8):
dax: Use rwsem for dax_{read,write}_lock()
dax: Introduc
In order to introduce dax holder registration, we need a write lock for
dax. Change the current lock to percpu_rw_semaphore and introduce a
dax write lock for registration.
Signed-off-by: Shiyang Ruan
---
drivers/dax/device.c | 11
drivers/dax/super.c| 51
filesystem is being mounted,
or an target device is being activated.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 63 +
include/linux/dax.h | 25 ++
2 files changed, 88 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax
ake sure disassociation works fine, we use page->index as
refcount, and clear page->mapping to the initial state when page->index
is decreased to 0.
With the help of this new flag, it is able to distinguish normal case
and CoW case, and keep the warning in normal case.
Signed-off-by:
r use.
Signed-off-by: Shiyang Ruan
---
fs/dax.c| 65 -
include/linux/dax.h | 15 +++
2 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index 1f46810d4b68..b3c737aff9de 100644
--- a/fs/dax.c
+++ b/fs/
is kill processes with that file mapped into their address spaces, but
future patches could actually do something about corrupt metadata.
After that, the memory failure needs to notify the processes who are
using those files.
Signed-off-by: Shiyang Ruan
---
fs/xfs/Makefile | 1 +
filesystem is being mounted,
or an target device is being activated.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 61 +
include/linux/dax.h | 25 +++
2 files changed, 86 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax
d on metadata
| | try to recover data, call xfs_force_shutdown()
| |* corrupted on file data
| | try to recover data, call mf_dax_kill_procs()
|* normal case
|-
|mf_generic_kill_procs()
==
Shiyang Ruan (9):
dax: Use percpu rwsem for dax_{read,write}_l
In order to introduce dax holder registration, we need a write lock for
dax. Change the current lock to percpu_rw_semaphore and introduce a
write lock for registration.
Signed-off-by: Shiyang Ruan
---
drivers/dax/device.c | 11 +--
drivers/dax/super.c| 40
memory_failure_dev_pagemap code is a bit complex before introduce RMAP
feature for fsdax. So it is needed to factor some helper functions to
simplify these code.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
Reviewed-by: Christoph Hellwig
---
mm/memory-failure.c | 141
memory failure
from pmem driver to upper layers. If there is something not support in
the notify routine, memory_failure will fall back to the generic hanlder.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c| 16
include/linux
ppings and offsets may share the same page in fsdax
mode. So, it is called when filesystem RMAP results are found.
Signed-off-by: Shiyang Ruan
---
fs/dax.c| 10 --
include/linux/dax.h | 9 +
include/linux/mm.h | 2 ++
mm/memory-fail
Add these helper functions, and export them for filesystem use.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 19 +++
include/linux/dax.h | 15 +++
2 files changed, 34 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index a19fcc0a54f3
在 2021/12/14 23:40, Christoph Hellwig 写道:
On Thu, Dec 02, 2021 at 04:48:48PM +0800, Shiyang Ruan wrote:
In order to introduce dax holder registration, we need a write lock for
dax. Change the current lock to percpu_rw_semaphore and introduce a
write lock for registration.
Why do we need
在 2021/12/14 23:47, Christoph Hellwig 写道:
On Thu, Dec 02, 2021 at 04:48:54PM +0800, Shiyang Ruan wrote:
Add these helper functions, and export them for filesystem use.
What is the point of adding these wrappers vs just calling the
underlying functions?
I added them so that they can be
filesystem is being mounted,
or an target device is being activated.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 62 +
include/linux/dax.h | 29 +
2 files changed, 91 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax
In order to introduce dax holder registration, we need a write lock for
dax. The write operation is per dax device job. So, the global lock is
not suitable. Change the current lock to percpu_rw_semaphore and introduce
a write lock for registration.
Signed-off-by: Shiyang Ruan
---
drivers/dax
ake sure disassociation works fine, we use page->index as
refcount, and clear page->mapping to the initial state when page->index
is decreased to 0.
With the help of this new flag, it is able to distinguish normal case
and CoW case, and keep the warning in normal case.
Signed-off-by:
The function name has been changed, so the description should be updated
too.
Signed-off-by: Shiyang Ruan
---
fs/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index 1f46810d4b68..2ee2d5a525ee 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -390,7 +390,7
memory failure
from pmem driver to upper layers. If there is something not support in
the notify routine, memory_failure will fall back to the generic hanlder.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c| 16
include/linux
is kill processes with that file mapped into their address spaces, but
future patches could actually do something about corrupt metadata.
After that, the memory failure needs to notify the processes who are
using those files.
Signed-off-by: Shiyang Ruan
---
fs/xfs/Makefile | 1 +
ppings and offsets may share the same page in fsdax mode.
It will be called when filesystem's RMAP results are found.
Signed-off-by: Shiyang Ruan
---
include/linux/mm.h | 2 +
mm/memory-failure.c | 89 +++--
2 files changed, 80 insertions(+), 11 del
igned-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
---
fs/dax.c| 63 +
include/linux/dax.h | 15 +++
2 files changed, 78 insertions(+)
diff --git a/fs/dax.c b/fs/dax.c
index 2ee2d5a525ee..b3c737aff9de 100644
--- a/fs/dax.c
memory_failure_dev_pagemap code is a bit complex before introduce RMAP
feature for fsdax. So it is needed to factor some helper functions to
simplify these code.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
Reviewed-by: Christoph Hellwig
---
mm/memory-failure.c | 141
Since it is not a DAX-specific function, move it into mm and rename it
to be a generic helper.
Signed-off-by: Shiyang Ruan
---
fs/dax.c | 12 +---
include/linux/mm.h | 13 +
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index
ata
| | try to recover data, call xfs_force_shutdown()
| |* corrupted on file data
| | try to recover data, call mf_dax_kill_procs()
|* normal case
|-
|mf_generic_kill_procs()
==
Shiyang Ruan (10):
dax: Use percpu rwsem for dax_{read,write}_lock()
dax: Introduce
在 2022/1/5 6:44, Dan Williams 写道:
On Sun, Dec 26, 2021 at 6:35 AM Shiyang Ruan wrote:
In order to introduce dax holder registration, we need a write lock for
dax.
As far as I can see, no, a write lock is not needed while the holder
is being registered.
The synchronization that is needed
在 2022/1/20 16:46, Christoph Hellwig 写道:
On Wed, Jan 05, 2022 at 04:12:04PM -0800, Dan Williams wrote:
We ended up with explicit callbacks after hch balked at a notifier
call-chain, but I think we're back to that now. The partition mistake
might be unfixable, but at least bdev_dax_pgoff() is
在 2022/1/20 16:59, Christoph Hellwig 写道:
On Sun, Dec 26, 2021 at 10:34:39PM +0800, Shiyang Ruan wrote:
+#define FS_DAX_MAPPING_COW 1UL
+
+#define MAPPING_SET_COW(m) (m = (struct address_space *)FS_DAX_MAPPING_COW)
+#define MAPPING_TEST_COW(m)(((unsigned long)m
在 2022/1/21 15:16, Christoph Hellwig 写道:
On Fri, Jan 21, 2022 at 10:33:58AM +0800, Shiyang Ruan wrote:
But different question, how does this not conflict with:
#define PAGE_MAPPING_ANON 0x1
in page-flags.h?
Now we are treating dax pages, so I think its flags should be different
call xfs_force_shutdown()
| |* corrupted on file data
| | try to recover data, call mf_dax_kill_procs()
|* normal case
|-
|mf_generic_kill_procs()
==
Shiyang Ruan (9):
dax: Introduce holder for dax_device
mm: factor helpers for memory_failure_dev_pagemap
pagemap,pmem: Introduce -&
filesystem is being mounted,
or an target device is being activated.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 62 +
include/linux/dax.h | 29 +
2 files changed, 91 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax
memory_failure_dev_pagemap code is a bit complex before introduce RMAP
feature for fsdax. So it is needed to factor some helper functions to
simplify these code.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
Reviewed-by: Christoph Hellwig
---
mm/memory-failure.c | 141
to make sure disassociation works fine, we use page->index as
refcount, and clear page->mapping to the initial state when page->index
is decreased to 0.
With the help of this new flag, it is able to distinguish normal case
and CoW case, and keep the warning in normal case.
Signed-off-by:
igned-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
---
fs/dax.c| 44
include/linux/dax.h | 8
2 files changed, 52 insertions(+)
diff --git a/fs/dax.c b/fs/dax.c
index c8d57080c1aa..964512107c23 100644
--- a/fs/dax.c
+++
memory failure
from pmem driver to upper layers. If there is something not support in
the notify routine, memory_failure will fall back to the generic hanlder.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c| 16
include/linux
Since it is not a DAX-specific function, move it into mm and rename it
to be a generic helper.
Signed-off-by: Shiyang Ruan
Reviewed-by: Christoph Hellwig
---
fs/dax.c | 12 +---
include/linux/mm.h | 13 +
2 files changed, 14 insertions(+), 11 deletions(-)
diff
is kill processes with that file mapped into their address spaces, but
future patches could actually do something about corrupt metadata.
After that, the memory failure needs to notify the processes who are
using those files.
Signed-off-by: Shiyang Ruan
---
fs/xfs/Makefile | 1 +
ppings and offsets may share the same page in fsdax mode.
It will be called when filesystem's RMAP results are found.
Signed-off-by: Shiyang Ruan
---
include/linux/mm.h | 4 ++
mm/memory-failure.c | 91 +++--
2 files changed, 84 insertions(+), 11 del
The function name has been changed, so the description should be updated
too.
Signed-off-by: Shiyang Ruan
Reviewed-by: Darrick J. Wong
Reviewed-by: Christoph Hellwig
---
fs/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index cd03485867a7
activated.
Signed-off-by: Shiyang Ruan
---
drivers/dax/super.c | 95 +
include/linux/dax.h | 30 ++
2 files changed, 125 insertions(+)
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index e3029389d809..d7fb4c36bf16 100644
--- a/drivers
e mapped into their address spaces, but
future patches could actually do something about corrupt metadata.
After that, the memory failure needs to notify the processes who are
using those files.
Signed-off-by: Shiyang Ruan
---
fs/xfs/Makefile | 1 +
fs/xfs/xfs_buf.c| 1
在 2022/2/15 9:46, Darrick J. Wong 写道:
On Sun, Feb 13, 2022 at 09:02:24PM +0800, Shiyang Ruan wrote:
v10.1 update:
- Handle the error code returns by dax_register_holder()
- In v10.1, dax_register_holder() will hold a write lock so XFS
doesn't need to hold a lock
- Fix the mi
在 2022/2/16 10:09, Dan Williams 写道:
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote:
Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file
mappings. In this case, the dax-RMAP already takes the responsibility
to look up for shared files by given dax page. The page
在 2022/2/16 9:34, Dan Williams 写道:
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote:
The current dax_lock_page() locks dax entry by obtaining mapping and
index in page. To support 1-to-N RMAP in NVDIMM, we need a new function
to lock a specific dax entry
I do not see a call to
1 - 100 of 375 matches
Mail list logo