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 >> >

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

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

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

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

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 <b...@au1.ibm.com> wrote: > On Thu, 2018-03-01 at 11:21 -0800, Dan Williams wrote: >> On Wed, Feb 28, 2018 at 7:56 PM, Benjamin Herrenschmidt >> <b...@au1.ibm.com> wrote: >> > On Thu, 2018-03-01 at 14:54

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

Re: [PATCH] brd: fix overflow in __brd_direct_access

2017-09-13 Thread Dan Williams
s/block/brd.c > +++ linux-4.13/drivers/block/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)p

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

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 <bart.vanass...@wdc.com> 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

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 <ross.zwis...@linux.intel.com> 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_

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

2017-07-25 Thread Dan Williams
<mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- Noticed this while looking at unrelated brd code... drivers/block/brd.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

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

2017-05-09 Thread Dan Williams
gt; [cannot apply to v4.11] >> [if your patch 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-05152

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

2017-05-08 Thread Dan Williams
be supported by alloc_chrdev_region(). Fixes: ba09c01d2fa8 ("dax: convert to the cdev api") Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/dax/Kconfig |5 - drivers/dax/super.c | 11 +++--

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

2017-05-08 Thread Dan Williams
Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- block/Kconfig |1 - fs/Kconfig |1 + include/linux/dax.h | 37 ++--- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/b

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

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

2017-04-28 Thread Dan Williams
> Cc: Jeff Moyer <jmo...@redhat.com> Cc: Ingo Molnar <mi...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Matthew Wilcox <

[PATCH] block: hide badblocks attribute by default

2017-04-27 Thread Dan Williams
sible when the driver has not populated a 'struct badblocks' instance in the gendisk. Cc: Jens Axboe <ax...@fb.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Martin K. Petersen <martin.peter...@oracle.com> Reported-by: Vishal Verma <vishal.l.ve...@intel.com> Signed-off-by: Dan

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

2017-04-26 Thread Dan Williams
<t...@linutronix.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- This patch is based on a merge of vfs.git/for-next and nvdimm.git/libnvdimm-for-next. arch/x86/Kconfig

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 <dan.j.willi...@intel.com> 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-mappe

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

2017-04-21 Thread Dan Williams
/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 <dan.j.willi...@intel.com> wrote: > [ resend to add dm-devel, linux-block, and fs-devel, apologies for the > duplicates ] > > C

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

2017-04-21 Thread Dan Williams
ABLE_WRITES >> setting there. This way drivers 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

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 <dan.j.willi...@intel.com> 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 cur

Re: [PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread Dan Williams
ve the system] > > > 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 s

[PATCH v3] axon_ram: add dax_operations support

2017-04-19 Thread Dan Williams
fer <gerald.schae...@de.ibm.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- Changes since v2: * fix return code in the alloc_dax() failure case (Gerald) arch/powerpc/platforms/Kconfig |1 + arch/powerpc/sysdev/axonram.c | 48 +++-

[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 <dan.j.willi...@intel.com> --- Changes since v2: * fixed slab corruption due to non-null dax_dev->host at dax_i_callback() time drivers/dax/dax.h|2 + dr

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 <gerald.schae...@de.ibm.com> wrote: > On Mon, 17 Apr 2017 12:09:32 -0700 > Dan Williams <dan.j.willi...@intel.com> wrote: > >> Setup a dax_dev to have the same lifetime as the dcssblk block device >> a

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

2017-04-17 Thread Dan Williams
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 <h...@lst.de> Signed-off-by: Da

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

2017-04-17 Thread Dan Williams
-off-by: Dan Williams <dan.j.willi...@intel.com> --- 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

[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 <dan.j.willi...@intel.com> --- drivers/dax/dax.h|2 + drivers/dax/device.c |2 + drivers/dax/super.c | 83 -- i

[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 <dan.j

[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 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 <dan.j

[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 <dan.j.willi...@intel.com> --- fs/ext2/inode.c |9 - fs/ext4/i

[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 <dan.j.willi...@intel.com> --- block/Kconfig

[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 <toshi.k...@hpe.com> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/md/dm-linear.c| 27 +-- drivers/md/dm-snap.c |6 +++--- drivers/md/d

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

2017-04-17 Thread Dan Williams
r the removal of bdev_direct_access() and should have been included in commit 223757016837 ("block_dev: remove DAX leftovers"). Cc: Jeff Moyer <jmo...@redhat.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- block/partition-generic.c | 17 ++--

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

2017-04-17 Thread Dan Williams
Hellwig <h...@lst.de> Cc: Tony Luck <tony.l...@intel.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Da

[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 <dan.j.willi...@intel.com> --- arch/powerpc/sysdev/axonram.c | 23 - d

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

2017-04-17 Thread Dan Williams
gt; Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/nvdimm/pmem.c | 43 +++ include/lin

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

2017-04-17 Thread Dan Williams
. This conceptually allows for an array of mixed device drivers with varying flush implementations. Cc: Toshi Kani <toshi.k...@hpe.com> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/dax/super.c | 11 +++ driv

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

2017-04-17 Thread Dan Williams
assed down by the bus / libnvdimm. Cc: Christoph Hellwig <h...@lst.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/nvdimm/pmem.c | 11 +++ includ

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

2017-04-17 Thread Dan Williams
de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- fs/dax.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index 11b9909c91df..edbf988

[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 <dan.j.willi...@intel.com> --- arch/x86/include/asm/pmem.h

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

2017-04-17 Thread Dan Williams
x.de> Cc: Oliver O'Halloran <ooh...@gmail.com> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- 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
de> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- arch/x86/include/asm/pmem

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

2017-04-17 Thread Dan Williams
om> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- fs/dax.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index f37ed21e4093..5b7ee1bc74d0 100644 --- a/fs/dax.c

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

2017-04-17 Thread Dan Williams
r <jmo...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Toshi Kani <toshi.k...@hpe.com> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Cc: Linus Torvalds <torva...@linux-foundation.

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

2017-04-17 Thread Dan Williams
ny Luck <tony.l...@intel.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: Al Viro <v...@zeniv.linux.org.uk> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Oliver O'Halloran <ooh...@gmail.com> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisl

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

2017-04-17 Thread Dan Williams
->flush() operation in the pmem driver when it is hosted on a volatile range. Cc: Jan Kara <j...@suse.cz> Cc: Jeff Moyer <jmo...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.i

[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 <j...@suse.cz> Cc: Jeff Moyer <jmo...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off

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

2017-04-17 Thread Dan Williams
gt; Cc: Jeff Moyer <jmo...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/nvdimm/pmem.c|9 +++

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

2017-04-17 Thread Dan Williams
t; Cc: Thomas Gleixner <t...@linutronix.de> Cc: Matthew Wilcox <mawil...@microsoft.com> Cc: Ross Zwisler <ross.zwis...@linux.intel.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- arch/x86/include/asm/pmem.h | 13 - fs/dax.c|

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

2017-04-17 Thread Dan Williams
<h...@lst.de> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- 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

[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 <toshi.k...@hpe.com> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/md/Kconfig|1 drivers/md/dm-core.h |1 drivers/md/dm.c

[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 <dan.j.willi...@intel.com> --- fs/block_dev.c | 24 include/linux/blkdev.h |1 - 2 files changed, 25 deletions(-) diff --git a/fs/block_dev.

[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 <h...@lst.de> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/dax/dax.h|4 +++- drivers/dax/device.c |6 ++

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

2017-04-17 Thread Dan Williams
.schae...@de.ibm.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/s390/block/Kconfig |1 + drivers/s390/block/dcssblk.c | 54 +++--- 2 files changed, 46 insertions(+), 9 deletions(-) diff --git a/drivers/s390/block/Kconfig b/dri

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

2017-04-17 Thread Dan Williams
hes 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 Williams (33): device-dax: rename 'dax_dev' to 'dev_da

Re: [PATCH 0/11 v4] block: Fix block device shutdown related races

2017-03-13 Thread Dan Williams
On Mon, Mar 13, 2017 at 8:13 AM, Jan Kara wrote: > Hello, > > this is a series with the remaining patches (on top of 4.11-rc2) to fix > several > different races and issues I've found when testing device shutdown and reuse. > The first two patches fix possible (theoretical)

Re: [PATCH 4/4] Revert "scsi, block: fix duplicate bdi name registration crashes"

2017-03-08 Thread Dan Williams
; > [1]: http://marc.info/?l=linux-block=148554717109098=2 > > Signed-off-by: Jan Kara <j...@suse.cz> Acked-by: Dan Williams <dan.j.willi...@intel.com>

Re: [PATCH 0/13 v2] block: Fix block device shutdown related races

2017-02-21 Thread Dan Williams
On Tue, Feb 21, 2017 at 9:19 AM, Jan Kara wrote: > On Tue 21-02-17 18:09:45, Jan Kara wrote: >> Hello, >> >> this is a second revision of the patch set to fix several different races and >> issues I've found when testing device shutdown and reuse. The first three >> patches are

Re: [lkp-robot] [scsi, block] 0dba1314d4: WARNING:at_fs/sysfs/dir.c:#sysfs_warn_dup

2017-02-09 Thread Dan Williams
On Wed, Feb 8, 2017 at 4:08 PM, James Bottomley <james.bottom...@hansenpartnership.com> wrote: > On Mon, 2017-02-06 at 21:42 -0800, Dan Williams wrote: [..] >> ...but it reproduces on current mainline with the same config. I >> haven't spotted what makes scsi_debug behave l

Re: [lkp-robot] [scsi, block] 0dba1314d4: WARNING:at_fs/sysfs/dir.c:#sysfs_warn_dup

2017-02-06 Thread Dan Williams
On Mon, Feb 6, 2017 at 8:09 PM, Jens Axboe <ax...@fb.com> wrote: > On 02/06/2017 05:14 PM, James Bottomley wrote: >> On Sun, 2017-02-05 at 21:13 -0800, Dan Williams wrote: >>> On Sun, Feb 5, 2017 at 1:13 AM, Christoph Hellwig <h...@lst.de> wrote: >>>>

Re: [PATCH v3] scsi, block: fix duplicate bdi name registration crashes

2017-02-01 Thread Dan Williams
On Wed, Feb 1, 2017 at 2:35 PM, Jens Axboe <ax...@kernel.dk> wrote: > On 02/01/2017 02:05 PM, Dan Williams wrote: >> Warnings of the following form occur because scsi reuses a devt number >> while the block layer still has it referenced as the name of the bdi >> [1]: >

[PATCH v2] scsi, block: fix duplicate bdi name registration crashes

2017-02-01 Thread Dan Williams
h...@lst.de> Cc: Jens Axboe <ax...@kernel.dk> Cc: Jan Kara <j...@suse.cz> Reported-by: Omar Sandoval <osan...@osandov.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- Changes in v2: * rebased on top of Jan's bdi lifetime series * replace kref_{get,put}() wit

Re: [PATCH 4/4] block: Make blk_get_backing_dev_info() safe without open bdev

2017-02-01 Thread Dan Williams
e is evicted from > memory. This pins struct backing_dev_info in memory and thus fixes the > crashes. > > Reported-by: Dan Williams <dan.j.willi...@intel.com> > Reported-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> > Signed-off-by: Jan Kara <j...@suse.cz> Tested-by

Re: [RFC PATCH 10/17] block: introduce bdev_dax_direct_access()

2017-02-01 Thread Dan Williams
On Wed, Feb 1, 2017 at 12:10 AM, Christoph Hellwig <h...@lst.de> wrote: > On Mon, Jan 30, 2017 at 10:16:29AM -0800, Dan Williams wrote: >> Ok, now that dax_map_atomic() is gone, it's much easier to remove >> struct blk_dax_ctl. >> >> We can also move the partition

Re: [RFC PATCH 13/17] fs: update mount_bdev() to lookup dax infrastructure

2017-02-01 Thread Dan Williams
On Wed, Feb 1, 2017 at 12:08 AM, Christoph Hellwig <h...@lst.de> wrote: > On Mon, Jan 30, 2017 at 10:29:12AM -0800, Dan Williams wrote: >> On Mon, Jan 30, 2017 at 4:26 AM, Christoph Hellwig <h...@lst.de> wrote: >> > On Sat, Jan 28, 2017 at 12:37:

Re: [RFC PATCH] scsi, block: fix duplicate bdi name registration crashes

2017-01-30 Thread Dan Williams
On Mon, Jan 30, 2017 at 4:24 AM, Christoph Hellwig wrote: > Hi Dan, > > this looks mostly fine to me. A few code comments below, but except > for this there is another issue with it: We still have drivers > that share a single request_queue for multiple gendisks, so I wonder scsi

Re: [RFC PATCH] scsi, block: fix duplicate bdi name registration crashes

2017-01-30 Thread Dan Williams
On Mon, Jan 30, 2017 at 4:24 AM, Christoph Hellwig wrote: > Hi Dan, > > this looks mostly fine to me. A few code comments below, but except > for this there is another issue with it: We still have drivers > that share a single request_queue for multiple gendisks, so I wonder > >

Re: [RFC PATCH 13/17] fs: update mount_bdev() to lookup dax infrastructure

2017-01-30 Thread Dan Williams
On Mon, Jan 30, 2017 at 4:26 AM, Christoph Hellwig <h...@lst.de> wrote: > On Sat, Jan 28, 2017 at 12:37:14AM -0800, Dan Williams wrote: >> This is in preparation for removing the ->direct_access() method from >> block_device_operations. > > I don't think mount_bdev

Re: [RFC PATCH 10/17] block: introduce bdev_dax_direct_access()

2017-01-30 Thread Dan Williams
On Mon, Jan 30, 2017 at 4:32 AM, Christoph Hellwig <h...@lst.de> wrote: > On Sat, Jan 28, 2017 at 12:36:58AM -0800, Dan Williams wrote: >> Provide a replacement for bdev_direct_access() that uses >> dax_operations.direct_access() instead of >> block_device_operation

Re: [PATCH 0/4 RFC] BDI lifetime fix

2017-01-30 Thread Dan Williams
On Mon, Jan 30, 2017 at 9:19 AM, Jan Kara <j...@suse.cz> wrote: > On Thu 26-01-17 22:15:06, Dan Williams wrote: >> On Thu, Jan 26, 2017 at 9:45 AM, Jan Kara <j...@suse.cz> wrote: >> > Hello, >> > >> > this patch series attempts to solve the proble

Re: [RFC PATCH 01/17] dax: refactor dax-fs into a generic provider of dax inodes

2017-01-30 Thread Dan Williams
On Mon, Jan 30, 2017 at 4:28 AM, Christoph Hellwig wrote: > I really don't like the dax_inode name. Why not something like > dax_device or dax_region? Fair enough, I'll switch struct dax_inode to dax_device and switch the existing struct dax_dev to dax_info. -- To unsubscribe from

Re: [RFC PATCH] scsi, block: fix duplicate bdi name registration crashes

2017-01-29 Thread Dan Williams
On Sun, Jan 29, 2017 at 11:22 PM, Omar Sandoval <osan...@osandov.com> wrote: > On Mon, Jan 30, 2017 at 08:05:52AM +0100, Hannes Reinecke wrote: >> On 01/29/2017 05:58 AM, Dan Williams wrote: >> > Warnings of the following form occur because scsi reuses a devt number &g

[RFC PATCH] scsi, block: fix duplicate bdi name registration crashes

2017-01-28 Thread Dan Williams
h...@lst.de> Cc: Jens Axboe <ax...@kernel.dk> Reported-by: Omar Sandoval <osan...@osandov.com> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- block/blk-core.c |1 + block/genhd.c |7 +++ drivers/scsi/sd.c | 41

[RFC PATCH 04/17] dax: introduce dax_operations

2017-01-28 Thread Dan Williams
t each dax-driver and teach fs/dax.c to use ->direct_access() from dax_operations instead of block_device_operations. Suggested-by: Christoph Hellwig <h...@lst.de> Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/dax/dax.h|4 +++- drivers/dax/device.c |

[RFC PATCH 13/17] fs: update mount_bdev() to lookup dax infrastructure

2017-01-28 Thread Dan Williams
This is in preparation for removing the ->direct_access() method from block_device_operations. Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- fs/block_dev.c |6 -- fs/super.c | 32 +--- include/linux/fs.h |1 + 3 files ch

[RFC PATCH 15/17] Revert "block: use DAX for partition table reads"

2017-01-28 Thread Dan Williams
r the removal of bdev_direct_access() and should have been included in commit 223757016837 ("block_dev: remove DAX leftovers"). Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- block/partition-generic.c | 17 ++--- fs/dax.c | 20

[RFC PATCH 10/17] block: introduce bdev_dax_direct_access()

2017-01-28 Thread Dan Williams
alignment constraints to be violated we still need to validate the block_device before calling the dax ->direct_access method. Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- block/Kconfig |1 + drivers/dax/super.c| 33

[RFC PATCH 05/17] pmem: add dax_operations support

2017-01-28 Thread Dan Williams
Setup a dax_inode 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 <dan.j

[RFC PATCH 09/17] block: kill bdev_dax_capable()

2017-01-28 Thread Dan Williams
This is leftover dead code that has since been replaced by bdev_dax_supported(). Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- fs/block_dev.c | 24 include/linux/blkdev.h |1 - 2 files changed, 25 deletions(-) diff --git a/fs/block_dev.

[RFC PATCH 08/17] dcssblk: add dax_operations support

2017-01-28 Thread Dan Williams
Setup a dax_inode 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. Signed-off-by: Dan Willi

[RFC PATCH 07/17] brd: add dax_operations support

2017-01-28 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 <dan.j

[RFC PATCH 06/17] axon_ram: add dax_operations support

2017-01-28 Thread Dan Williams
Setup a dax_inode 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. --- arch/powerpc/platforms/Kconfig |

[RFC PATCH 11/17] dm: add dax_operations support (producer)

2017-01-28 Thread Dan Williams
dm representation to upper layers. Sub-sequent patches are needed to convert the bottom layer interface to backing devices. Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/md/Kconfig |1 + drivers/md/dm-core.h |3 +++ drivers/md/dm.c

[RFC PATCH 16/17] fs, dax: convert filesystem-dax to bdev_dax_direct_access

2017-01-28 Thread Dan Williams
Now that a dax_inode is plumbed through all dax-capable drivers we can switch from block_device_operations to dax_operations for invoking ->direct_access. Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- fs/dax.c| 143 +++---

[RFC PATCH 14/17] ext2, ext4, xfs: retrieve dax_inode through iomap operations

2017-01-28 Thread Dan Williams
In preparation for converting fs/dax.c to use bdev_dax_direct_access() instead of bdev_direct_access(), add the plumbing to retrieve the dax_inode determined at mount through ->iomap_begin. Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- fs/ext2/inode.c |1 + fs/ext

[RFC PATCH 12/17] dm: add dax_operations support (consumer)

2017-01-28 Thread Dan Williams
Arrange for dm to lookup the dax services available from member devices. Update the dax-capable targets, linear and stripe, to route dax operations to the underlying device. Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/md/dm-linear.c

[RFC PATCH 17/17] block: remove block_device_operations.direct_access and related infrastructure

2017-01-28 Thread Dan Williams
Now that all the producers and consumers of dax interfaces have been converted to using dax_operations on a dax_inode, remove the block device direct_access enabling. Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- arch/powerpc/sysdev/axonram.c | 15 -- drivers

[RFC PATCH 03/17] dax: add a facility to lookup a dax inode by 'host' device name

2017-01-28 Thread Dan Williams
name. This is a band-aid until filesystems are able to mount on a dax-inode directly. We use a hash list since blkdev_writepages() will need to use this interface to issue dax_writeback_mapping_range(). Signed-off-by: Dan Williams <dan.j.willi...@intel.com> --- drivers/dax/dax.h

[RFC PATCH 01/17] dax: refactor dax-fs into a generic provider of dax inodes

2017-01-28 Thread Dan Williams
m on top of the base dax inode. Filesystem DAX goes through a block_device for now, but perhaps directly to a dax inode in the future, or for new pmem-only filesystems. [1]: https://lkml.org/lkml/2017/1/19/880 Suggested-by: Christoph Hellwig <h...@lst.de> Signed-off-by: Dan Williams <dan.j.wi

[RFC PATCH 00/17] introduce a dax_inode for dax_operations

2017-01-28 Thread Dan Williams
tests, but I have not tested the non-libnvdimm dax drivers. [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-January/008586.html [2]: https://lists.01.org/pipermail/linux-nvdimm/2017-January/008638.html --- Dan Williams (17): dax: refactor dax-fs into a generic provider of dax inod

[RFC PATCH 02/17] dax: convert dax_inode locking to srcu

2017-01-28 Thread Dan Williams
In preparation for adding dax_operations that perform ->direct_access() and user copy operations relative to a dax_inode, convert the existing dax_inode locking to srcu. Some dax drivers need to sleep in their ->direct_access() methods and user copying may fault / sleep. Signed-off-b

Re: [PATCH 0/4 RFC] BDI lifetime fix

2017-01-26 Thread Dan Williams
On Thu, Jan 26, 2017 at 9:45 AM, Jan Kara wrote: > Hello, > > this patch series attempts to solve the problems with the life time of a > backing_dev_info structure. Currently it lives inside request_queue structure > and thus it gets destroyed as soon as request queue goes away.

Re: [PATCH 3/4] block: Dynamically allocate and refcount backing_dev_info

2017-01-26 Thread Dan Williams
On Thu, Jan 26, 2017 at 9:45 AM, Jan Kara wrote: > Instead of storing backing_dev_info inside struct request_queue, > allocate it dynamically, reference count it, and free it when the last > reference is dropped. Currently only request_queue holds the reference > but in the

Re: [RFC PATCH v2 0/2] block: fix backing_dev_info lifetime

2017-01-26 Thread Dan Williams
On Thu, Jan 26, 2017 at 5:17 AM, Christoph Hellwig wrote: > On Thu, Jan 26, 2017 at 11:06:53AM +0100, Jan Kara wrote: >> Yeah, so my patches (and I suspect your as well), have a problem when the >> backing_device_info stays around because blkdev inode still exists, device >> gets

Re: [RFC PATCH v2 0/2] block: fix backing_dev_info lifetime

2017-01-25 Thread Dan Williams
On Mon, Jan 23, 2017 at 1:17 PM, Thiago Jung Bauermann <bauer...@linux.vnet.ibm.com> wrote: > Hello Dan, > > Am Freitag, 6. Januar 2017, 17:02:51 BRST schrieb Dan Williams: >> v1 of these changes [1] was a one line change to bdev_get_queue() to >> prevent a shutdown cra

Re: [LSF/MM TOPIC] block level event logging for storage media management

2017-01-22 Thread Dan Williams
[ adding Oleg ] On Sun, Jan 22, 2017 at 10:00 PM, Song Liu wrote: > Hi Dan, > > I think the the block level event log is more like log only system. When en > event > happens, it is not necessary to take immediate action. (I guess this is > different > to bad block

  1   2   >