Presently __bdev_dax_supported() checks if first sector of last
page ( last_page ) on the block device is aligned to page
boundary. However the code to compute 'last_page' assumes that there
are 8 sectors/page assuming a 4K page-size.
This assumption breaks on architectures which use a different
This Message was undeliverable due to the following reason:
Your message was not delivered because the destination computer was
not reachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.
Most likely
The pull request you sent on Wed, 15 May 2019 17:05:58 -0700:
> git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
> tags/libnvdimm-fixes-5.2-rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/83f3ef3de625a5766de2382f9e077d4daafd5bac
Thank you!
--
On Wed, May 15, 2019 at 11:12 AM Pavel Tatashin
wrote:
>
> > Hi Pavel,
> >
> > I am working on adding this sort of a workflow into a new daxctl command
> > (daxctl-reconfigure-device)- this will allow changing the 'mode' of a
> > dax device to kmem, online the resulting memory, and with your
> On May 15, 2019, at 7:25 PM, Dan Williams wrote:
>
> On Tue, May 14, 2019 at 8:08 AM Qian Cai wrote:
>>
>> Several places (dimm_devs.c, core.c etc) include label.h but only
>> label.c uses NSINDEX_SIGNATURE, so move its definition to label.c
>> instead.
>> In file included from
>>}
>>
>> diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
>> index 7ff684159f29..2eb6a6cfe9e4 100644
>> --- a/drivers/nvdimm/bus.c
>> +++ b/drivers/nvdimm/bus.c
>> @@ -642,7 +642,7 @@ static struct attribute *nd_device_attributes[] = {
>>NULL,
>> };
>>
>> -/**
On Wed, 2019-05-15 at 17:26 -0700, Dan Williams wrote:
> On Wed, May 15, 2019 at 5:25 PM Verma, Vishal L
> wrote:
> > On Wed, 2019-05-15 at 16:25 -0700, Dan Williams wrote:
> > > > diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> > > > index 4671776f5623..9f02a99cfac0 100644
> > > >
On Wed, May 15, 2019 at 5:25 PM Verma, Vishal L
wrote:
>
> On Wed, 2019-05-15 at 16:25 -0700, Dan Williams wrote:
> >
> > > diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> > > index 4671776f5623..9f02a99cfac0 100644
> > > --- a/drivers/nvdimm/btt.c
> > > +++ b/drivers/nvdimm/btt.c
> >
On Wed, 2019-05-15 at 16:25 -0700, Dan Williams wrote:
>
> > diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> > index 4671776f5623..9f02a99cfac0 100644
> > --- a/drivers/nvdimm/btt.c
> > +++ b/drivers/nvdimm/btt.c
> > @@ -1269,11 +1269,9 @@ static int btt_read_pg(struct btt *btt, struct
On Wed, May 15, 2019 at 12:28 PM Vivek Goyal wrote:
>
> From: Stefan Hajnoczi
>
> Although struct dax_device itself is not tied to a block device, some
> DAX code assumes there is a block device. Make block devices optional
> by allowing bdev to be NULL in commonly used DAX APIs.
>
> When there
On Tue, May 14, 2019 at 7:55 AM Pankaj Gupta wrote:
>
> This patch adds functionality to perform flush from guest
> to host over VIRTIO. We are registering a callback based
> on 'nd_region' type. virtio_pmem driver requires this special
> flush function. For rest of the region types we are
On 15.05.19 22:46, David Hildenbrand wrote:
>> +vpmem->vdev = vdev;
>> +vdev->priv = vpmem;
>> +err = init_vq(vpmem);
>> +if (err) {
>> +dev_err(>dev, "failed to initialize virtio pmem vq's\n");
>> +goto out_err;
>> +}
>> +
>> +
On Tue, May 14, 2019 at 8:25 AM Pankaj Gupta wrote:
>
>
> > On 5/14/19 7:54 AM, Pankaj Gupta wrote:
> > > diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig
> > > index 35897649c24f..94bad084ebab 100644
> > > --- a/drivers/virtio/Kconfig
> > > +++ b/drivers/virtio/Kconfig
> > > @@ -42,6
> + vpmem->vdev = vdev;
> + vdev->priv = vpmem;
> + err = init_vq(vpmem);
> + if (err) {
> + dev_err(>dev, "failed to initialize virtio pmem vq's\n");
> + goto out_err;
> + }
> +
> + virtio_cread(vpmem->vdev, struct virtio_pmem_config,
> +
On Mon, Mar 11, 2019 at 5:08 PM Linus Torvalds
wrote:
>
> On Mon, Mar 11, 2019 at 8:37 AM Dan Williams wrote:
> >
> > Another feature the userspace tooling can support for the PMEM as RAM
> > case is the ability to complete an Address Range Scrub of the range
> > before it is added to the
From: Stefan Hajnoczi
Although struct dax_device itself is not tied to a block device, some
DAX code assumes there is a block device. Make block devices optional
by allowing bdev to be NULL in commonly used DAX APIs.
When there is no block device:
* Skip the partition offset calculation in
From: Stefan Hajnoczi
Add a basic file system module for virtio-fs.
Signed-off-by: Stefan Hajnoczi
Signed-off-by: Vivek Goyal
---
fs/fuse/Kconfig | 11 +
fs/fuse/Makefile| 1 +
fs/fuse/fuse_i.h| 13 +
fs/fuse/inode.c | 15
Add logic to free up a busy memory range. Freed memory range will be
returned to free pool. Add a worker which can be started to select
and free some busy memory ranges.
In certain cases (write path), process can steal one of its busy
dax ranges if free range is not available.
If free range is
From: Stefan Hajnoczi
virtio-fs will need unique IDs for FORGET requests from outside
fs/fuse/dev.c. Make the symbol visible.
Signed-off-by: Stefan Hajnoczi
---
fs/fuse/dev.c| 3 ++-
fs/fuse/fuse_i.h | 5 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dev.c
From: Stefan Hajnoczi
fuse_fill_super() includes code to process the fd= option and link the
struct fuse_dev to the fd's struct file. In virtio-fs there is no file
descriptor because /dev/fuse is not used.
This patch extracts fuse_fill_super_common() so that both classic fuse
and virtio-fs can
If fuse daemon is started with cache=never, fuse falls back to direct IO.
In that write path we don't call file_remove_privs() and that means setuid
bit is not cleared if unpriviliged user writes to a file with setuid bit set.
pjdfstest chmod test 12.t tests this and fails.
Fix this by calling
virtio-fs does not support aborting requests which are being processed. That
is requests which have been sent to fuse daemon on host.
So do not provide "abort" interface for virtio-fs in fusectl.
Signed-off-by: Vivek Goyal
---
fs/fuse/control.c | 4 ++--
fs/fuse/fuse_i.h| 4
From: Stefan Hajnoczi
The /dev/fuse device uses fiq->waitq and fasync to signal that requests
are available. These mechanisms do not apply to virtio-fs. This patch
introduces callbacks so alternative behavior can be used.
Note that queue_interrupt() changes along these lines:
Divide the dax memory range into fixed size ranges (2MB for now) and put
them in a list. This will track free ranges. Once an inode requires a
free range, we will take one from here and put it in interval-tree
of ranges assigned to inode.
Signed-off-by: Vivek Goyal
Signed-off-by: Peng Tao
---
From: Stefan Hajnoczi
Setup a dax device.
Use the shm capability to find the cache entry and map it.
The DAX window is accessed by the fs/dax.c infrastructure and must have
struct pages (at least on x86). Use devm_memremap_pages() to map the
DAX window PCI BAR and allocate struct page.
fuse_dax_free_memory() can be very cpu intensive in corner cases. For example,
if one inode has consumed all the memory and a setupmapping request is
pending, that means inode lock is held by request and worker thread will
not get lock for a while. And given there is only one inode consuming all
Introduce two new fuse commands to setup/remove memory mappings. This
will be used to setup/tear down file mapping in dax window.
Signed-off-by: Vivek Goyal
---
include/uapi/linux/fuse.h | 33 +
1 file changed, 33 insertions(+)
diff --git
This is done along the lines of ext4 and xfs. I primarily wanted ->writepages
hook at this time so that I could call into dax_writeback_mapping_range().
This in turn will decide which pfns need to be written back.
Signed-off-by: Vivek Goyal
---
fs/fuse/file.c | 19 +++
1 file
This list will be used selecting fuse_dax_mapping to free when number of
free mappings drops below a threshold.
Signed-off-by: Vivek Goyal
---
fs/fuse/file.c | 8
fs/fuse/fuse_i.h | 7 +++
fs/fuse/inode.c | 4
3 files changed, 19 insertions(+)
diff --git a/fs/fuse/file.c
From: Sebastien Boeuf
On MMIO a new set of registers is defined for finding SHM
regions. Add their definitions and use them to find the region.
Signed-off-by: Sebastien Boeuf
---
drivers/virtio/virtio_mmio.c | 32
include/uapi/linux/virtio_mmio.h | 11
This will be used by virtio-fs to send init request to fuse server after
initialization of virt queues.
Signed-off-by: Vivek Goyal
---
fs/fuse/dev.c| 1 +
fs/fuse/fuse_i.h | 1 +
fs/fuse/inode.c | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dev.c
This patch implements basic DAX support. mmap() is not implemented
yet and will come in later patches. This patch looks into implemeting
read/write.
We make use of interval tree to keep track of per inode dax mappings.
Do not use dax for file extending writes, instead just send WRITE message
to
From: Sebastien Boeuf
Virtio defines 'shared memory regions' that provide a continuously
shared region between the host and guest.
Provide a method to find a particular region on a device.
Signed-off-by: Sebastien Boeuf
Signed-off-by: Dr. David Alan Gilbert
---
include/linux/virtio_config.h
From: Stefan Hajnoczi
A struct dax_device instance is a prerequisite for the DAX filesystem
APIs. Let virtio_fs associate a dax_device with a fuse_conn. Classic
FUSE and CUSE set the pointer to NULL, disabling DAX.
Signed-off-by: Stefan Hajnoczi
---
fs/fuse/cuse.c | 3 ++-
From: Stefan Hajnoczi
Add DAX mmap() support.
Signed-off-by: Stefan Hajnoczi
---
fs/fuse/file.c | 64 +-
1 file changed, 63 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index edbb11ca735e..a053bcb9498d 100644
---
fuse_file_put(sync) can be called with sync=true/false. If sync=true,
it waits for release request response and then calls iput() in the
caller's context. If sync=false, it does not wait for release request
response, frees the fuse_file struct immediately and req->end function
does the iput().
From: Miklos Szeredi
---
fs/fuse/file.c | 15 ++-
fs/splice.c| 3 ++-
include/linux/fs.h | 2 ++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 5baf07fd2876..e9a7aa97c539 100644
--- a/fs/fuse/file.c
+++
From: Stefan Hajnoczi
virtio-fs will need to complete requests from outside fs/fuse/dev.c.
Make the symbol visible.
Signed-off-by: Stefan Hajnoczi
---
fs/fuse/dev.c| 19 ++-
fs/fuse/fuse_i.h | 5 +
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git
As of now fuse_dev_alloc() both allocates a fuse device and installs it
in fuse_conn list. fuse_dev_alloc() can fail if fuse_device allocation
fails.
virtio-fs needs to initialize multiple fuse devices (one per virtio
queue). It initializes one fuse device as part of call to
When a file is opened with O_TRUNC, we need to make sure that any other
DAX operation is not in progress. DAX expects i_size to be stable.
In fuse_iomap_begin() we check for i_size at multiple places and we expect
i_size to not change.
Another problem is, if we setup a mapping in
Hi,
Here are the RFC patches for V2 of virtio-fs. These patches apply on top
of 5.1 kernel. These patches are also available here.
https://github.com/rhvgoyal/linux/commits/virtio-fs-dev-5.1
Patches for V1 were posted here.
From: Sebastien Boeuf
On PCI the shm regions are found using capability entries;
find a region by searching for the capability.
Signed-off-by: Sebastien Boeuf
Signed-off-by: Dr. David Alan Gilbert
---
drivers/virtio/virtio_pci_modern.c | 108 +
Right now dax_writeback_mapping_range() is passed a bdev and dax_dev
is searched from that bdev name.
virtio-fs does not have a bdev. So pass in dax_dev also to
dax_writeback_mapping_range(). If dax_dev is passed in, bdev is not
used otherwise dax_dev is searched using bdev.
Signed-off-by: Vivek
From: Miklos Szeredi
Don't hold onto dentry in lru list if need to re-lookup it anyway at next
access.
More advanced version of this patch would periodically flush out dentries
from the lru which have gone stale.
Signed-off-by: Miklos Szeredi
---
fs/fuse/dir.c | 26 +++---
From: Stefan Hajnoczi
virtio-fs will need to query the length of fuse_arg lists. Make the
symbol visible.
Signed-off-by: Stefan Hajnoczi
---
fs/fuse/dev.c| 7 ---
fs/fuse/fuse_i.h | 5 +
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> Hi Pavel,
>
> I am working on adding this sort of a workflow into a new daxctl command
> (daxctl-reconfigure-device)- this will allow changing the 'mode' of a
> dax device to kmem, online the resulting memory, and with your patches,
> also attempt to offline the memory, and change back to
原邮件信息 -
发件人:罗先生
收件人:linux-nvdimm
发送时间:2019-5-16 2:08:23
___
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
On Tue, 14 May 2019 16:19:02 -0700
Brendan Higgins wrote:
> Hmmm...probably premature to bring this up, but Documentation/dev-tools/
> is kind of thrown together.
Wait a minute, man... *I* created that directory, are you impugning my
work? :)
But yes, "kind of thrown together" is a good
>
> Pankaj reports that starting with commit ad428cdb525a "dax: Check the
> end of the block-device capacity with dax_direct_access()" device-mapper
> no longer allows dax operation. This results from the stricter checks in
> __bdev_dax_supported() that validate that the start and end of a
>
On Tue 14-05-19 20:48:49, Dan Williams wrote:
> Pankaj reports that starting with commit ad428cdb525a "dax: Check the
> end of the block-device capacity with dax_direct_access()" device-mapper
> no longer allows dax operation. This results from the stricter checks in
> __bdev_dax_supported() that
50 matches
Mail list logo