On Fri, Apr 26, 2019 at 10:30:35AM +0530, Pankaj Gupta wrote:
> This patch adds virtio-pmem driver for KVM guest.
>
> Guest reads the persistent memory range information from
> Qemu over VIRTIO and registers it on nvdimm_bus. It also
> creates a nd_region object with the persistent memory
> range
The original message was received at Tue, 30 Apr 2019 12:01:36 +0800
from lists.01.org [88.237.50.30]
- The following addresses had permanent fatal errors -
___
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
From: Goldwyn Rodrigues
We 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.
btrfs does not
From: Goldwyn Rodrigues
With dax we cannot deal with readpage() etc. So, we create a
funciton callback to perform the file data comparison and pass
it to generic_remap_file_range_prep() so it can use iomap-based
functions.
This may not be the best way to solve this. Suggestions welcome.
From: Goldwyn Rodrigues
This is for debug purposes only and can be skipped.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/dax.c | 3 +++
include/trace/events/btrfs.h | 56
2 files changed, 59 insertions(+)
diff --git
From: Goldwyn Rodrigues
Inorder to make sure mmap'd files don't change after snapshot,
writeprotect the mmap pages on snapshot. This is done by performing
a data writeback on the pages (which simply mark the pages are
wrprotected). This way if the user process tries to access the memory
we will
From: Goldwyn Rodrigues
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/inode.c | 34 +++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index af4b56cba104..05714ffc4894 100644
--- a/fs/btrfs/inode.c
+++
From: Goldwyn Rodrigues
Change dax_iomap_pfn to return the address as well in order to
use it for performing a memcpy in case the type is IOMAP_DAX_COW.
We don't handle PMD because btrfs does not support hugepages.
Question:
The sequence of bdev_dax_pgoff() and dax_direct_access() is
used
From: Adam Borowski
Used by userspace to detect DAX.
[rgold...@suse.com: Added CONFIG_FS_DAX around mmap_supported_flags]
Signed-off-by: Adam Borowski
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 4
1 file changed, 4 insertions(+)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
From: Goldwyn Rodrigues
Since we will be using it in another part of the code, use a
better name to declare it non-static
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 7 +--
fs/btrfs/inode.c | 14 +-
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git
From: Goldwyn Rodrigues
However, this needed more iomap fields, so it was easier
to pass iomap and compute inside the function rather
than passing a log of arguments.
Note, there is subtle difference between iomap_sector and
dax_iomap_sector(). Can we replace dax_iomap_sector with
From: Goldwyn Rodrigues
Perform a basic read using iomap support. The btrfs_iomap_begin()
finds the extent at the position and fills the iomap data
structure with the values.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/Makefile | 1 +
fs/btrfs/ctree.h | 5 +
fs/btrfs/dax.c| 49
From: Goldwyn Rodrigues
Add a new vm_operations struct btrfs_dax_vm_ops
specifically for dax files.
Since we will be removing(nulling) readpages/writepages for dax
return ENOEXEC only for non-dax files.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/dax.c | 13
From: Goldwyn Rodrigues
This is temporary, and a TODO.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ioctl.c | 13 +
fs/btrfs/send.c | 4
2 files changed, 17 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 5ebb52848d5a..2470f90c9983 100644
---
From: Goldwyn Rodrigues
This sets S_DAX in inode->i_flags, which can be used with
IS_DAX().
The dax option is restricted to non multi-device mounts.
dax interacts with the device directly instead of using bio, so
all bio-hooks which we use for multi-device cannot be performed
here. While
From: Goldwyn Rodrigues
The IOMAP_DAX_COW is a iomap type which performs copy of
edges of data while performing a write if start/end are
not page aligned. The source address is expected in
iomap->inline_data.
dax_copy_edges() is a helper functions performs a copy from
one part of the device to
From: Goldwyn Rodrigues
btrfs_dax_zero_block() zeros part of the page, either from the
front or the regular rest of the block.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/dax.c | 27 ++-
fs/btrfs/inode.c | 4
3 files changed, 31
This patch set adds support for dax on the BTRFS filesystem.
In order to support for CoW for btrfs, there were changes which had to be
made to the dax handling. The important one is copying blocks into the
same dax device before using them which is performed by iomap
type IOMAP_DAX_COW.
From: Goldwyn Rodrigues
This makes btrfs_get_extent_map_write() independent of Direct
I/O code.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/inode.c | 40 +++-
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git
From: Goldwyn Rodrigues
IOMAP_DAX_COW allows to inform the dax code, to first perform
a copy which are not page-aligned before performing the write.
The responsibility of checking if data edges are page aligned
is performed in ->iomap_begin() and the source address is
stored in ->inline_data
A
From: Goldwyn Rodrigues
We require this to make sure we return type IOMAP_DAX_COW in
iomap structure, in the later patches.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 2 +-
fs/btrfs/inode.c | 9 +++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git
21 matches
Mail list logo