Re: [LSF/MM TOPIC] Software RAID Support for NV-DIMM

2019-02-15 Thread Dan Williams
On Fri, Feb 15, 2019 at 1:57 AM Johannes Thumshirn wrote: > > (This is a joint proposal with Hannes Reinecke) > > Servers with NV-DIMM are slowly emerging in data centers but one key feature > for reliability of these systems hasn't been addressed up to now, data > redundancy. > > While it would b

Re: [LSF/MM TOPIC] Software RAID Support for NV-DIMM

2019-02-16 Thread Dan Williams
On Fri, Feb 15, 2019 at 9:40 PM Dave Chinner wrote: > > On Sat, Feb 16, 2019 at 04:31:33PM +1100, Dave Chinner wrote: > > On Fri, Feb 15, 2019 at 10:57:12AM +0100, Johannes Thumshirn wrote: > > > (This is a joint proposal with Hannes Reinecke) > > > > > > Servers with NV-DIMM are slowly emerging i

Re: [LSF/MM TOPIC] Software RAID Support for NV-DIMM

2019-02-18 Thread Dan Williams
On Mon, Feb 18, 2019 at 2:50 AM Johannes Thumshirn wrote: > > On 16/02/2019 06:39, Dave Chinner wrote: > [..] > > >> We've supported this since mid 2018 and commit ba23cba9b3bd ("fs: > >> allow per-device dax status checking for filesystems"). That is, > >> we can have DAX on the XFS RT device ind

Re: [PATCH v1 00/15] Keep track of GUPed pages in fs and block

2019-04-17 Thread Dan Williams
On Tue, Apr 16, 2019 at 12:50 PM Jerome Glisse wrote: > > On Tue, Apr 16, 2019 at 12:12:27PM -0700, Dan Williams wrote: > > On Tue, Apr 16, 2019 at 11:59 AM Kent Overstreet > > wrote: > > > > > > On Tue, Apr 16, 2019 at 09:35:04PM +0300, Boaz Harrosh wrote: &

[resend PATCH v2 00/33] dax: introduce dax_operations

2017-04-17 Thread Dan Williams
by the 0day robot. All review welcome, but the patches that need extra attention are the device-mapper and uio changes (copy_from_iter_ops). This series is based on a merge of char-misc-next (for cdev api reworks) and libnvdimm-fixes (dax locking and __copy_user_nocache fixes). --- Dan William

[resend PATCH v2 04/33] dax: introduce dax_operations

2017-04-17 Thread Dan Williams
dax-driver and teach fs/dax.c to use ->direct_access() from dax_operations instead of block_device_operations. Suggested-by: Christoph Hellwig Signed-off-by: Dan Williams --- drivers/dax/dax.h|4 +++- drivers/dax/device.c |6 +- drivers/dax/super.c |6 +- includ

[resend PATCH v2 08/33] dcssblk: add dax_operations support

2017-04-17 Thread Dan Williams
Setup a dax_dev to have the same lifetime as the dcssblk block device and add a ->direct_access() method that is equivalent to dcssblk_direct_access(). Once fs/dax.c has been converted to use dax_operations the old dcssblk_direct_access() will be removed. Cc: Gerald Schaefer Signed-off-by:

[resend PATCH v2 09/33] block: kill bdev_dax_capable()

2017-04-17 Thread Dan Williams
This is leftover dead code that has since been replaced by bdev_dax_supported(). Signed-off-by: Dan Williams --- fs/block_dev.c | 24 include/linux/blkdev.h |1 - 2 files changed, 25 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index

[resend PATCH v2 11/33] dm: add dax_device and dax_operations support

2017-04-17 Thread Dan Williams
ess implementations is deferred to a separate patch. Cc: Toshi Kani Cc: Mike Snitzer Signed-off-by: Dan Williams --- drivers/md/Kconfig|1 drivers/md/dm-core.h |1 drivers/md/dm.c | 84 ++--- include/linux/device-mappe

[resend PATCH v2 15/33] filesystem-dax: convert to dax_direct_access()

2017-04-17 Thread Dan Williams
off-by: Dan Williams --- fs/dax.c| 277 +-- fs/iomap.c |3 - include/linux/dax.h |6 + 3 files changed, 162 insertions(+), 124 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index b78a6947c4f5..ce9dc9c3e829 100644 --- a

[resend PATCH v2 25/33] x86, dax: replace clear_pmem() with open coded memset + dax_ops->flush

2017-04-17 Thread Dan Williams
cache management completely defined within the pmem driver. Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- arch/x86/include/asm/pme

[resend PATCH v2 33/33] libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region

2017-04-17 Thread Dan Williams
Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- drivers/nvdimm/pmem.c|9 +++-- drivers/nvdimm/region_devs.c |6 ++ include/linux/libnvdimm.h|1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers

[resend PATCH v2 31/33] libnvdimm, nfit: enable support for volatile ranges

2017-04-17 Thread Dan Williams
gt;flush() operation in the pmem driver when it is hosted on a volatile range. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c|9 - drivers/nvdimm/bus.c| 10 +++

[resend PATCH v2 30/33] libnvdimm, pmem: fix persistence warning

2017-04-17 Thread Dan Williams
need to warn if the architecture does not claim pmem support. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- drivers/nvdimm/region_devs.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers

[resend PATCH v2 29/33] uio, libnvdimm, pmem: implement cache bypass for all copy_from_iter() operations

2017-04-17 Thread Dan Williams
: Toshi Kani Cc: Al Viro Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Linus Torvalds Signed-off-by: Dan Williams --- drivers/nvdimm/Kconfig |1 + drivers/nvdimm/pmem.c | 38 +- drivers/nvdimm/pmem.h |7 +++ drivers/nvdimm/x86.c | 48

[resend PATCH v2 28/33] x86, libnvdimm, dax: stop abusing __copy_user_nocache

2017-04-17 Thread Dan Williams
HAS_PMEM_API is also moved local to libnvdimm to be next to the implementation. Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: Toshi Kani Cc: Tony Luck Cc: "H. Peter Anvin" Cc: Al Viro Cc: Thomas Gleixner Cc: Oliver O'Halloran Cc: Matthew Wilc

[resend PATCH v2 32/33] filesystem-dax: gate calls to dax_flush() on QUEUE_FLAG_WC

2017-04-17 Thread Dan Williams
dirty tracking. Userspace can override the default cache setting via the block device queue "write_cache" attribute in sysfs. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- fs/dax.c |6 -- 1 file

[resend PATCH v2 21/33] filesystem-dax: convert to dax_copy_from_iter()

2017-04-17 Thread Dan Williams
Now that all possible providers of the dax_operations copy_from_iter method are implemented, switch filesytem-dax to call the driver rather than copy_to_iter_pmem. Signed-off-by: Dan Williams --- arch/x86/include/asm/pmem.h | 50 --- fs/dax.c

[resend PATCH v2 26/33] x86, dax, libnvdimm: move wb_cache_pmem() to libnvdimm

2017-04-17 Thread Dan Williams
archs in the future. Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Oliver O'Halloran Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- arch/x86/include/asm/pmem.h | 21 ---

[resend PATCH v2 27/33] x86, libnvdimm, pmem: move arch_invalidate_pmem() to libnvdimm

2017-04-17 Thread Dan Williams
Kill this globally defined wrapper and move to libnvdimm so that we can ultimately remove the public pmem api. Cc: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Da

[resend PATCH v2 24/33] filesystem-dax: convert to dax_flush()

2017-04-17 Thread Dan Williams
method. We still do all the dirty tracking since the radix entry will already be there for locking purposes. However, the work to clean the entry will be a nop for some dax drivers. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan

[resend PATCH v2 23/33] dm: add ->flush() dax operation support

2017-04-17 Thread Dan Williams
conceptually allows for an array of mixed device drivers with varying flush implementations. Cc: Toshi Kani Cc: Mike Snitzer Signed-off-by: Dan Williams --- drivers/dax/super.c | 11 +++ drivers/md/dm-linear.c| 15 +++ drivers/md/dm-stripe.c| 20

[resend PATCH v2 22/33] dax, pmem: introduce an optional 'flush' dax_operation

2017-04-17 Thread Dan Williams
ed down by the bus / libnvdimm. Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- drivers/nvdimm/pmem.c | 11 +++ include/linux/dax.h |2 ++ 2 files changed, 13 insertions(+) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pm

[resend PATCH v2 19/33] dax, pmem: introduce 'copy_from_iter' dax operation

2017-04-17 Thread Dan Williams
ject cache management without imposing this overhead on other dax capable block_device drivers. This is also a first step of moving all architecture-specific pmem-operations to the pmem driver. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Al Viro Cc: Matthew Wilcox Cc: Ross Zwisler Signed-o

[resend PATCH v2 20/33] dm: add ->copy_from_iter() dax operation support

2017-04-17 Thread Dan Williams
. This conceptually allows for an array of mixed device drivers with varying copy_from_iter implementations. Cc: Toshi Kani Cc: Mike Snitzer Signed-off-by: Dan Williams --- drivers/dax/super.c | 13 + drivers/md/dm-linear.c| 15 +++ drivers/md/dm

[resend PATCH v2 18/33] x86, dax, pmem: remove indirection around memcpy_from_pmem()

2017-04-17 Thread Dan Williams
: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- arch/x86/include/asm/pmem.h |5 - arch/x86/include/asm/string_64.h |1 + drivers/acpi/nfit/core.c |3 +-- drivers/nvdimm/claim.c |2 +- drivers/nvdimm/pmem.c|2 +-

[resend PATCH v2 17/33] block: remove block_device_operations ->direct_access()

2017-04-17 Thread Dan Williams
Now that all the producers and consumers of dax interfaces have been converted to using dax_operations on a dax_device, remove the block device direct_access enabling. Signed-off-by: Dan Williams --- arch/powerpc/sysdev/axonram.c | 23 - drivers/block/brd.c

[resend PATCH v2 16/33] block, dax: convert bdev_dax_supported() to dax_direct_access()

2017-04-17 Thread Dan Williams
Kill of the final user of bdev_direct_access() and struct blk_dax_ctl. Signed-off-by: Dan Williams --- fs/block_dev.c | 48 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 2f7885712575

[resend PATCH v2 14/33] Revert "block: use DAX for partition table reads"

2017-04-17 Thread Dan Williams
he removal of bdev_direct_access() and should have been included in commit 223757016837 ("block_dev: remove DAX leftovers"). Cc: Jeff Moyer Signed-off-by: Dan Williams --- block/partition-generic.c | 17 ++--- fs/dax.c | 20 include/l

[resend PATCH v2 12/33] dm: teach dm-targets to use a dax_device + dax_operations

2017-04-17 Thread Dan Williams
alling convention. Cc: Toshi Kani Cc: Mike Snitzer Signed-off-by: Dan Williams --- drivers/md/dm-linear.c| 27 +-- drivers/md/dm-snap.c |6 +++--- drivers/md/dm-stripe.c| 29 ++--- drivers/md/dm-target.c

[resend PATCH v2 13/33] ext2, ext4, xfs: retrieve dax_device for iomap operations

2017-04-17 Thread Dan Williams
In preparation for converting fs/dax.c to use dax_direct_access() instead of bdev_direct_access(), add the plumbing to retrieve the dax_device associated with a given block_device. Signed-off-by: Dan Williams --- fs/ext2/inode.c |9 - fs/ext4/inode.c |9 - fs

[resend PATCH v2 10/33] dax: introduce dax_direct_access()

2017-04-17 Thread Dan Williams
can cause dax page alignment constraints to be violated this also introduces the bdev_dax_pgoff() helper. It handles calculating a logical pgoff relative to the dax_device and also checks for page alignment. Signed-off-by: Dan Williams --- block/Kconfig |1 + drivers/dax/super.c

[resend PATCH v2 06/33] axon_ram: add dax_operations support

2017-04-17 Thread Dan Williams
Setup a dax_device to have the same lifetime as the axon_ram block device and add a ->direct_access() method that is equivalent to axon_ram_direct_access(). Once fs/dax.c has been converted to use dax_operations the old axon_ram_direct_access() will be removed. Signed-off-by: Dan Willi

[resend PATCH v2 07/33] brd: add dax_operations support

2017-04-17 Thread Dan Williams
Setup a dax_inode to have the same lifetime as the brd block device and add a ->direct_access() method that is equivalent to brd_direct_access(). Once fs/dax.c has been converted to use dax_operations the old brd_direct_access() will be removed. Signed-off-by: Dan Williams --- drivers/bl

[resend PATCH v2 05/33] pmem: add dax_operations support

2017-04-17 Thread Dan Williams
Setup a dax_device to have the same lifetime as the pmem block device and add a ->direct_access() method that is equivalent to pmem_direct_access(). Once fs/dax.c has been converted to use dax_operations the old pmem_direct_access() will be removed. Signed-off-by: Dan Williams --- drivers/

[resend PATCH v2 03/33] dax: add a facility to lookup a dax device by 'host' device name

2017-04-17 Thread Dan Williams
it is the bdev name. This is a stop-gap until filesystems are able to mount on a dax-inode directly. Signed-off-by: Dan Williams --- drivers/dax/dax.h|2 + drivers/dax/device.c |2 + drivers/dax/super.c | 83 -- include/linux/dax.h |

[resend PATCH v2 01/33] device-dax: rename 'dax_dev' to 'dev_dax'

2017-04-17 Thread Dan Williams
al instance. Signed-off-by: Dan Williams --- drivers/dax/dax.c | 206 ++-- drivers/dax/dax.h |4 + drivers/dax/pmem.c |8 +- 3 files changed, 109 insertions(+), 109 deletions(-) diff --git a/drivers/dax/dax.c b/drivers/dax/dax.

[resend PATCH v2 02/33] dax: refactor dax-fs into a generic provider of 'struct dax_device' instances

2017-04-17 Thread Dan Williams
layers a filesystem on top of that same base device. Filesystem DAX is associated with a block_device for now, but perhaps directly to a dax device in the future, or for new pmem-only filesystems. [1]: https://lkml.org/lkml/2017/1/19/880 Suggested-by: Christoph Hellwig Signed-off

Re: [resend PATCH v2 08/33] dcssblk: add dax_operations support

2017-04-19 Thread Dan Williams
On Wed, Apr 19, 2017 at 8:31 AM, Gerald Schaefer wrote: > On Mon, 17 Apr 2017 12:09:32 -0700 > Dan Williams wrote: > >> Setup a dax_dev to have the same lifetime as the dcssblk block device >> and add a ->direct_access() method that is equivalent to >> dcssblk_dire

[PATCH v3] dax: add a facility to lookup a dax device by 'host' device name

2017-04-19 Thread Dan Williams
it is the bdev name. This is a stop-gap until filesystems are able to mount on a dax-inode directly. Signed-off-by: Dan Williams --- Changes since v2: * fixed slab corruption due to non-null dax_dev->host at dax_i_callback() time drivers/dax/dax.h|2 + drivers/dax/device.c |2 +

[PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread Dan Williams
fer Signed-off-by: Dan Williams --- Changes since v2: * fix return code in the alloc_dax() failure case (Gerald) arch/powerpc/platforms/Kconfig |1 + arch/powerpc/sysdev/axonram.c | 48 +++- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/a

[PATCH v3] dcssblk: add dax_operations support

2017-04-19 Thread Dan Williams
off-by: Dan Williams --- Changes since v2: * fix return code in the alloc_dax() failure case (Gerald) * assign dax_dev to dev_info and kill local variable (Gerald) drivers/s390/block/Kconfig |1 + drivers/s390/block/dcssblk.c | 55 +++--- 2 files chan

Re: [PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread Dan Williams
> > url: > https://github.com/0day-ci/linux/commits/Dan-Williams/axon_ram-add-dax_operations-support/20170420-091615 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next Hi kbuild team, yes this is the wrong base. It's part of a larger series [1] and I&

Re: [resend PATCH v2 11/33] dm: add dax_device and dax_operations support

2017-04-20 Thread Dan Williams
On Mon, Apr 17, 2017 at 12:09 PM, Dan Williams wrote: > Allocate a dax_device to represent the capacity of a device-mapper > instance. Provide a ->direct_access() method via the new dax_operations > indirection that mirrors the functionality of the current direct_access &

Re: [PATCH] block: get rid of blk_integrity_revalidate()

2017-04-21 Thread Dan Williams
rivers that call blk_integrity_register() and >> use integrity infrastructure won't interfere with drivers that don't >> but still want stable pages. > > I seem to recall that the reason for the revalidate hook was that either > NVMe or nvdimm had to register an integrity profile prior to the actual > format being known. > > So while I am OK with the change from a SCSI perspective, I think we > need Keith and Dan to ack it. Looks good to me, Tested-by: Dan Williams

Re: [resend PATCH v2 00/33] dax: introduce dax_operations

2017-04-21 Thread Dan Williams
vdimm/nvdimm.git/log/?h=libnvdimm-for-4.12-merge If it causes any other problems just drop and I'll retry for 4.13. On Mon, Apr 17, 2017 at 12:08 PM, Dan Williams wrote: > [ resend to add dm-devel, linux-block, and fs-devel, apologies for the > duplicates ] > > Changes since v1 [1]

Re: [resend PATCH v2 00/33] dax: introduce dax_operations

2017-04-25 Thread Dan Williams
On Fri, Apr 21, 2017 at 6:06 PM, Dan Williams wrote: > [ adding akpm, sfr, and jens ] > > I applied this series and pushed it out for the nvdimm.git branch that > gets auto pulled into -next. The set is still awaiting acks from > device-mapper, ext4, xfs, and vfs (for the cop

[RFC PATCH] x86, uaccess, pmem: introduce copy_from_iter_writethru for dax + pmem

2017-04-26 Thread Dan Williams
: Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Al Viro Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- This patch is based on a merge of vfs.git/for-next and nvdimm.git/libnvdimm-for-next. ar

[PATCH] block: hide badblocks attribute by default

2017-04-27 Thread Dan Williams
attribute not be visible when the driver has not populated a 'struct badblocks' instance in the gendisk. Cc: Jens Axboe Cc: Christoph Hellwig Cc: Martin K. Petersen Reported-by: Vishal Verma Signed-off-by: Dan Williams --- block/genhd.c | 11 +++ 1 file changed, 11 ins

[PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations

2017-04-28 Thread Dan Williams
c: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Al Viro Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Signed-off-by: Dan Williams --- Changes since the initial RFC: * s/writethru/wt/ since we already have ioremap_wt(), set_memory_wt(), etc. (Ingo) arch/x86/Kconfig

Re: [PATCH] brd: fix uninitialized use of brd->dax_dev

2017-05-03 Thread Dan Williams
On Wed, May 3, 2017 at 5:56 AM, Gerald Schaefer wrote: > commit 1647b9b9 "brd: add dax_operations support" introduced the allocation > and freeing of a dax_device, but the allocated dax_device is not stored > into the brd_device, so brd_del_one() will eventually operate on an > uninitialized brd->

Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations

2017-05-05 Thread Dan Williams
On Thu, May 4, 2017 at 11:54 PM, Ingo Molnar wrote: > > * Dan Williams wrote: > >> The pmem driver has a need to transfer data with a persistent memory >> destination and be able to rely on the fact that the destination writes >> are not cached. It is sufficient for th

Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations

2017-05-05 Thread Dan Williams
On Fri, May 5, 2017 at 1:39 PM, Kani, Toshimitsu wrote: > On Fri, 2017-04-28 at 12:39 -0700, Dan Williams wrote: >> The pmem driver has a need to transfer data with a persistent memory >> destination and be able to rely on the fact that the destination >> writes are not cac

Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations

2017-05-05 Thread Dan Williams
On Fri, May 5, 2017 at 3:44 PM, Kani, Toshimitsu wrote: > On Fri, 2017-05-05 at 15:25 -0700, Dan Williams wrote: >> On Fri, May 5, 2017 at 1:39 PM, Kani, Toshimitsu >> wrote: > : >> > > --- >> > > Changes since the initial RFC: >> > &

Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations

2017-05-06 Thread Dan Williams
On Sat, May 6, 2017 at 2:46 AM, Ingo Molnar wrote: > > * Dan Williams wrote: > >> On Fri, May 5, 2017 at 3:44 PM, Kani, Toshimitsu wrote: >> > On Fri, 2017-05-05 at 15:25 -0700, Dan Williams wrote: >> >> On Fri, May 5, 2017 at 1:

Re: BLOCK selects DAX (was: Re: dax: introduce dax_direct_access())

2017-05-07 Thread Dan Williams
caa924d8eff2ace94bee70506bc308 >> Parent: d8f07aee3f2fd959878bf614d4e984900018eb9e >> Refname:refs/heads/master >> Author: Dan Williams >> AuthorDate: Thu Jan 26 20:37:35 2017 -0800 >> Committer: Dan Williams >> CommitDate: Thu Apr 20 11:57:52 2017 -0

Re: [PATCH v2] x86, uaccess: introduce copy_from_iter_wt for pmem / writethrough operations

2017-05-08 Thread Dan Williams
On Mon, May 8, 2017 at 1:32 PM, Ross Zwisler wrote: > On Fri, Apr 28, 2017 at 12:39:12PM -0700, Dan Williams wrote: >> The pmem driver has a need to transfer data with a persistent memory >> destination and be able to rely on the fact that the destination writes >>

[PATCH 1/2] block, dax: move "select DAX" from BLOCK to FS_DAX

2017-05-08 Thread Dan Williams
Uytterhoeven Signed-off-by: Dan Williams --- block/Kconfig |1 - fs/Kconfig |1 + include/linux/dax.h | 37 ++--- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/block/Kconfig b/block/Kconfig index 93da7fc3f254

[PATCH 2/2] device-dax: kill NR_DEV_DAX

2017-05-08 Thread Dan Williams
supported by alloc_chrdev_region(). Fixes: ba09c01d2fa8 ("dax: convert to the cdev api") Reported-by: Geert Uytterhoeven Signed-off-by: Dan Williams --- drivers/dax/Kconfig |5 - drivers/dax/super.c | 11 +++ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git

Re: [PATCH 1/2] block, dax: move "select DAX" from BLOCK to FS_DAX

2017-05-09 Thread Dan Williams
is applied to the wrong git tree, please drop us a note to >> help improve the system] >> >> url: >> https://github.com/0day-ci/linux/commits/Dan-Williams/block-dax-move-select-DAX-from-BLOCK-to-FS_DAX/20170509-051522 >> config: parisc-c3000_defconfig (attached as

Re: [BUG] kernel NULL pointer dereference observed during pmem btt switch test

2016-07-28 Thread Dan Williams
[ adding linux-block ] On Wed, Jul 27, 2016 at 8:20 PM, Yi Zhang wrote: > Hello everyone > > Could you help check this issue, thanks. > > Steps I used: > 1. Reserve 4*8G of memory for pmem by add kernel parameter "memmap=8G!4G > memmap=8G!12G memmap=8G!20G memmap=8G!28G" > 2. Execute below scrip

Re: [PATCH] block: remove BLK_DEV_DAX config option

2016-07-29 Thread Dan Williams
ion. > > Signed-off-by: Ross Zwisler > Cc: Dave Hansen > Cc: Dan Williams Acked-by: Dan Williams -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [BUG] kernel NULL pointer dereference observed during pmem btt switch test

2016-07-30 Thread Dan Williams
On Thu, Jul 28, 2016 at 8:50 AM, Dan Williams wrote: > [ adding linux-block ] > > On Wed, Jul 27, 2016 at 8:20 PM, Yi Zhang wrote: >> Hello everyone >> >> Could you help check this issue, thanks. >> >> Steps I used: >> 1. Reserve 4*8G of memory f

Re: [BUG] kernel NULL pointer dereference observed during pmem btt switch test

2016-07-31 Thread Dan Williams
On Sun, Jul 31, 2016 at 10:19 AM, yizhan wrote: > On 07/30/2016 11:52 PM, Dan Williams wrote: >> >> On Thu, Jul 28, 2016 at 8:50 AM, Dan Williams >> wrote: >>> >>> [ adding linux-block ] >>> >>> On Wed, Jul 27, 2016 at 8:20 PM, Yi Zhang

[PATCH] block: fix bdi vs gendisk lifetime mismatch

2016-07-31 Thread Dan Williams
e_groups_vargs+0xd8/0x100 [] device_create_vargs+0x1c/0x20 [] bdi_register+0x8c/0x180 [] bdi_register_dev+0x27/0x30 [] add_disk+0x175/0x4a0 Cc: Reported-by: Yi Zhang Tested-by: Yi Zhang Signed-off-by: Dan Williams --- block/genhd.c|2 +- include/linux/backing-dev-defs.h |1

Time to make dynamically allocated devt the default for scsi disks?

2016-08-12 Thread Dan Williams
...or, for that matter, any block device driver on a bus that supports hotplug? In 4.8 Jens merged the following fix for a crash that was triggered by repeatedly reconfiguring a libnvdimm namespace causing it to destroy and create disks (rapid hotplug). df08c32ce3be block: fix bdi vs gendisk

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-12 Thread Dan Williams
On Fri, Aug 12, 2016 at 2:35 PM, Bart Van Assche wrote: > On 08/12/2016 02:29 PM, Dan Williams wrote: >> >> ...or, for that matter, any block device driver on a bus that supports >> hotplug? >> >> In 4.8 Jens merged the following fix for a crash that was triggered

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-12 Thread Dan Williams
On Fri, Aug 12, 2016 at 5:17 PM, James Bottomley wrote: > On Fri, 2016-08-12 at 14:29 -0700, Dan Williams wrote: >> Before spending effort trying to flush the destruction of old bdi >> instances before new ones are registered, is it rather time to >> complete the convers

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-12 Thread Dan Williams
On Fri, Aug 12, 2016 at 5:29 PM, Dan Williams wrote: > On Fri, Aug 12, 2016 at 5:17 PM, James Bottomley > wrote: >> On Fri, 2016-08-12 at 14:29 -0700, Dan Williams wrote: >>> Before spending effort trying to flush the destruction of old bdi >>> instances before

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-13 Thread Dan Williams
On Sat, Aug 13, 2016 at 8:23 AM, James Bottomley wrote: > On Fri, 2016-08-12 at 21:57 -0700, Dan Williams wrote: >> On Fri, Aug 12, 2016 at 5:29 PM, Dan Williams < >> dan.j.willi...@intel.com> wrote: >> > On Fri, Aug 12, 2016 at 5:17 PM, James Bottomley >> &g

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-14 Thread Dan Williams
On Sat, Aug 13, 2016 at 11:27 AM, Dan Williams wrote: > On Sat, Aug 13, 2016 at 10:43 AM, James Bottomley [..] >> Um, so this patch doesn't fix the problem. It merely makes the lifetime >> rules correct so the problem can then be fixed at the scsi level. > > You're

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-14 Thread Dan Williams
On Sat, Aug 13, 2016 at 10:43 AM, James Bottomley wrote: > On Sat, 2016-08-13 at 09:29 -0700, Dan Williams wrote: >> On Sat, Aug 13, 2016 at 8:23 AM, James Bottomley >> wrote: >> > It does? The race is the fact that the parent can be removed >> > before the ch

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-14 Thread Dan Williams
On Sun, Aug 14, 2016 at 10:20 AM, James Bottomley wrote: > On Sat, 2016-08-13 at 11:27 -0700, Dan Williams wrote: >> On Sat, Aug 13, 2016 at 10:43 AM, James Bottomley >> wrote: >> > On Sat, 2016-08-13 at 09:29 -0700, Dan Williams wrote: >> > > On Sat, Aug

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-14 Thread Dan Williams
[ adding Bart back to the cc ] On Sun, Aug 14, 2016 at 11:08 AM, Dan Williams wrote: > On Sun, Aug 14, 2016 at 10:20 AM, James Bottomley > wrote: [..] > I like it. I still think the bdi registration code should be in > charge of taking the extra reference on the disk device

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-30 Thread Dan Williams
On Mon, Aug 29, 2016 at 11:16 AM, Bart Van Assche wrote: > On 08/14/2016 10:21 AM, James Bottomley wrote: >> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c >> index d3e852a..222771d 100644 >> --- a/drivers/scsi/sd.c >> +++ b/drivers/scsi/sd.c >> @@ -3000,7 +3000,13 @@ static void sd_probe_asyn

Re: [PATCH] block_dev: remove DAX leftovers

2016-09-14 Thread Dan Williams
x_do_io and some uneeded i_flags manipulations introduced in commit > bbab37 ("block: Add support for DAX reads/writes to block devices"). > > Remove those leftovers. > > Signed-off-by: Christoph Hellwig Acked-by: Dan Williams -- To unsubscribe from this list: send the l

Re: [PATCH] badblocks: fix overlapping check for clearing

2016-10-10 Thread Dan Williams
heck not only if stored block end is past clear block end but also if >> stored block start is before clear block end. >> >> Signed-off-by: Tomasz Majchrzak > > Dan Williams seems to have taken responsibility for this code through > his nvdimm tree, so I've added him t

Re: [PATCH v4 1/4] block: Add iocontext priority to request

2016-10-13 Thread Dan Williams
On Thu, Oct 13, 2016 at 1:09 PM, Jens Axboe wrote: > On 10/13/2016 02:06 PM, Dan Williams wrote: >> >> On Thu, Oct 13, 2016 at 12:53 PM, Adam Manzanares >> wrote: >>> >>> Patch adds an association between iocontext ioprio and the ioprio of a >>&g

Re: [PATCH v4 1/4] block: Add iocontext priority to request

2016-10-13 Thread Dan Williams
On Thu, Oct 13, 2016 at 1:24 PM, Jens Axboe wrote: > On 10/13/2016 02:19 PM, Dan Williams wrote: >> >> On Thu, Oct 13, 2016 at 1:09 PM, Jens Axboe wrote: >>> >>> On 10/13/2016 02:06 PM, Dan Williams wrote: >>>> >>>> >>&

Re: [PATCH v4 1/4] block: Add iocontext priority to request

2016-10-13 Thread Dan Williams
On Thu, Oct 13, 2016 at 12:53 PM, Adam Manzanares wrote: > Patch adds an association between iocontext ioprio and the ioprio of a > request. This value is set in blk_rq_set_prio which takes the request and > the ioc as arguments. If the ioc is valid in blk_rq_set_prio then the > iopriority of the

Re: [PATCH 0/3] iopmem : A block device for PCIe memory

2016-10-18 Thread Dan Williams
[ adding Ashok and David for potential iommu comments ] On Tue, Oct 18, 2016 at 2:42 PM, Stephen Bates wrote: > This patch follows from an RFC we did earlier this year [1]. This > patchset applies cleanly to v4.9-rc1. > > Updates since RFC > - > Rebased. > Included the iopmem

Re: [PATCH 1/3] memremap.c : Add support for ZONE_DEVICE IO memory with struct pages.

2016-10-19 Thread Dan Williams
On Tue, Oct 18, 2016 at 2:42 PM, Stephen Bates wrote: > From: Logan Gunthorpe > > We build on recent work that adds memory regions owned by a device > driver (ZONE_DEVICE) [1] and to add struct page support for these new > regions of memory [2]. > > 1. Add an extra flags argument into dev_memrema

Re: [PATCH 0/3] iopmem : A block device for PCIe memory

2016-10-19 Thread Dan Williams
On Wed, Oct 19, 2016 at 11:48 AM, Stephen Bates wrote: > On Tue, Oct 18, 2016 at 08:51:15PM -0700, Dan Williams wrote: >> [ adding Ashok and David for potential iommu comments ] >> > > Hi Dan > > Thanks for adding Ashok and David! > >> >> I agree with

Re: [PATCH 1/3] memremap.c : Add support for ZONE_DEVICE IO memory with struct pages.

2016-10-19 Thread Dan Williams
On Wed, Oct 19, 2016 at 11:40 AM, Stephen Bates wrote: > On Wed, Oct 19, 2016 at 10:50:25AM -0700, Dan Williams wrote: >> On Tue, Oct 18, 2016 at 2:42 PM, Stephen Bates wrote: >> > From: Logan Gunthorpe >> > >> > We build on recent work that adds memory r

Re: [PATCH 0/3] iopmem : A block device for PCIe memory

2016-10-26 Thread Dan Williams
On Wed, Oct 26, 2016 at 1:24 AM, Haggai Eran wrote: [..] >> I wonder if we could (ab)use a >> software-defined 'pasid' as the requester id for a peer-to-peer >> mapping that needs address translation. > Why would you need that? Isn't it enough to map the peer-to-peer > addresses correctly in the i

block device shutdown crash in bdev_get_queue()

2016-10-28 Thread Dan Williams
Hi Jens, I caught the backtrace below with the libnvdimm unit test. It's hard to hit, and as far as I can tell it's been present for a while. Wanted to get a second opinion on the potential fix. The failure address of 0540 corresponds offset 1344 in struct gendisk according to pahole

[PATCH] brd: fix brd_rw_page() vs copy_to_brd_setup errors

2017-07-25 Thread Dan Williams
igned-off-by: Dan Williams --- Noticed this while looking at unrelated brd code... drivers/block/brd.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 104b71c0490d..055255ea131d 100644 --- a/drivers/block/brd.c +++ b/dr

Re: [PATCH] brd: fix brd_rw_page() vs copy_to_brd_setup errors

2017-07-26 Thread Dan Williams
On Wed, Jul 26, 2017 at 2:32 PM, Ross Zwisler wrote: > On Wed, Jul 26, 2017 at 01:12:28PM -0700, Christoph Hellwig wrote: >> On Tue, Jul 25, 2017 at 06:02:29PM -0700, Dan Williams wrote: >> > As is done in zram_rw_page, pmem_rw_page, and btt_rw_page, don't >> > c

Re: [resend PATCH v2 11/33] dm: add dax_device and dax_operations support

2017-07-29 Thread Dan Williams
On Fri, Jul 28, 2017 at 9:17 AM, Bart Van Assche wrote: > On Mon, 2017-04-17 at 12:09 -0700, Dan Williams wrote: >> diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig >> index b7767da50c26..1de8372d9459 100644 >> --- a/drivers/md/Kconfig >> +++ b/drivers/md/Kconfig &g

Re: [PATCH 5/5] testb: badblock support

2017-08-05 Thread Dan Williams
On Sat, Aug 5, 2017 at 8:51 AM, Shaohua Li wrote: > From: Shaohua Li > > Sometime disk could have tracks broken and data there is inaccessable, > but data in other parts can be accessed in normal way. MD RAID supports > such disks. But we don't have a good way to test it, because we can't > contr

Re: [PATCH] brd: fix overflow in __brd_direct_access

2017-09-13 Thread Dan Williams
k/brd.c > @@ -339,7 +339,7 @@ static long __brd_direct_access(struct b > > if (!brd) > return -ENODEV; > - page = brd_insert_page(brd, PFN_PHYS(pgoff) / 512); > + page = brd_insert_page(brd, (sector_t)pgoff << PAGE_SECTORS_SHIFT); Looks good to me, you can add: Reviewed-by: Dan Williams

Re: [PATCH v2 00/10] Copy Offload in NVMe Fabrics with P2P PCI Memory

2018-03-01 Thread Dan Williams
On Wed, Feb 28, 2018 at 7:56 PM, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-01 at 14:54 +1100, Benjamin Herrenschmidt wrote: >> On Wed, 2018-02-28 at 16:39 -0700, Logan Gunthorpe wrote: >> > Hi Everyone, >> >> >> So Oliver (CC) was having issues getting any of that to work for us. >> >> The p

Re: [PATCH v2 00/10] Copy Offload in NVMe Fabrics with P2P PCI Memory

2018-03-01 Thread Dan Williams
On Thu, Mar 1, 2018 at 12:34 PM, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-01 at 11:21 -0800, Dan Williams wrote: >> On Wed, Feb 28, 2018 at 7:56 PM, Benjamin Herrenschmidt >> wrote: >> > On Thu, 2018-03-01 at 14:54 +1100, Benjamin Herrenschmidt wrote: >> &

Re: [PATCH v2 02/10] PCI/P2PDMA: Add sysfs group to display p2pmem stats

2018-03-01 Thread Dan Williams
On Thu, Mar 1, 2018 at 4:15 PM, Logan Gunthorpe wrote: > > > On 01/03/18 10:44 AM, Bjorn Helgaas wrote: >> >> I think these two statements are out of order, since the attributes >> dereference pdev->p2pdma. And it looks like you set "error" >> unnecessarily, since you return immediately looking a

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-14 Thread Dan Williams
On Wed, Mar 14, 2018 at 12:03 PM, Logan Gunthorpe wrote: > > > On 14/03/18 12:51 PM, Bjorn Helgaas wrote: >> You are focused on PCIe systems, and in those systems, most topologies >> do have an upstream switch, which means two upstream bridges. I'm >> trying to remove that assumption because I do

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-14 Thread Dan Williams
On Wed, Mar 14, 2018 at 12:34 PM, Stephen Bates wrote: >> P2P over PCI/PCI-X is quite common in devices like raid controllers. > > Hi Dan > > Do you mean between PCIe devices below the RAID controller? Isn't it pretty > novel to be able to support PCIe EPs below a RAID controller (as opposed to

Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-05-08 Thread Dan Williams
On Mon, Apr 23, 2018 at 4:30 PM, Logan Gunthorpe wrote: > For peer-to-peer transactions to work the downstream ports in each > switch must not have the ACS flags set. At this time there is no way > to dynamically change the flags and update the corresponding IOMMU > groups so this is done at enume

Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-05-08 Thread Dan Williams
On Tue, May 8, 2018 at 3:32 PM, Alex Williamson wrote: > On Tue, 8 May 2018 16:10:19 -0600 > Logan Gunthorpe wrote: > >> On 08/05/18 04:03 PM, Alex Williamson wrote: >> > If IOMMU grouping implies device assignment (because nobody else uses >> > it to the same extent as device assignment) then th

Re: [PATCH] block: protect iterate_bdevs() against concurrent close

2017-01-05 Thread Dan Williams
On Thu, Dec 1, 2016 at 12:18 AM, Jan Kara wrote: > From: Rabin Vincent > > If a block device is closed while iterate_bdevs() is handling it, the > following NULL pointer dereference occurs because bdev->b_disk is NULL > in bdev_get_queue(), which is called from blk_get_backing_dev_info() (in > tu

Re: [PATCH] block: protect iterate_bdevs() against concurrent close

2017-01-05 Thread Dan Williams
On Thu, Jan 5, 2017 at 4:03 PM, Dan Williams wrote: > On Thu, Dec 1, 2016 at 12:18 AM, Jan Kara wrote: >> From: Rabin Vincent >> >> If a block device is closed while iterate_bdevs() is handling it, the >> following NULL pointer dereference occurs because

  1   2   >