Re: [Virtio-fs] [PATCH v3 2/3] dax: Add a wakeup mode parameter to put_unlocked_entry()

2021-04-22 Thread Christoph Hellwig
On Wed, Apr 21, 2021 at 12:09:54PM -0700, Dan Williams wrote: > Can you get in the habit of not replying inline with new patches like > this? Collect the review feedback, take a pause, and resend the full > series so tooling like b4 and patchwork can track when a new posting > supersedes a

Re: [PATCH v3 00/10] fsdax,xfs: Add reflink support for fsdax

2021-04-02 Thread Christoph Hellwig
Shiyang, Dan: given that the whole reflink+dax thing is going to take a while and thus not going to happen for this merge window, what about queueing up the cleanup patches 1,2 and 3 so that we can reduce the patch load a little? ___ Linux-nvdimm

Re: [PATCH v3 02/10] fsdax: Factor helper: dax_fault_actor()

2021-04-02 Thread Christoph Hellwig
> + if (write) > + return vmf_insert_mixed_mkwrite(vmf->vma, vmf->address, pfn); > + else > + return vmf_insert_mixed(vmf->vma, vmf->address, pfn); > +} No need for else statements after returning. Otherwis

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Christoph Hellwig
On Wed, Mar 24, 2021 at 09:37:01AM -0700, Dan Williams wrote: > > Eww. As I said I think the right way is that the file system (or > > other consumer) can register a set of callbacks for opening the device. > > How does that solve the problem of the driver being notified of all > pfn failure

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-03-24 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 07:19:28PM -0700, Dan Williams wrote: > So I think the path forward is: > > - teach memory_failure() to allow for ranged failures > > - let interested drivers register for memory failure events via a > blocking_notifier_head Eww. As I said I think the right way is that

Re: [RESEND PATCH v2.1 07/10] iomap: Introduce iomap_apply2() for operations on two files

2021-03-11 Thread Christoph Hellwig
On Thu, Mar 04, 2021 at 01:41:42PM +0800, Shiyang Ruan wrote: > Some operations, such as comparing a range of data in two files under > fsdax mode, requires nested iomap_open()/iomap_end() on two file. Thus, > we introduce iomap_apply2() to accept arguments from two files and > iomap_actor2_t for

Re: [PATCH v2] include: Remove pagemap.h from blkdev.h

2021-03-10 Thread Christoph Hellwig
ases > the number of files from 240, but that's still a big win -- 68% > reduction instead of 77%. Looks good. I suspect blkdev.h also has penty of other includes that aren't needed either.. Reviewed-by: Christoph Hellwig ___ Linux-nvdimm m

Re: [PATCH v2] libnvdimm: Notify disk drivers to revalidate region read-only

2021-03-09 Thread Christoph Hellwig
Looks good to me: Reviewed-by: Christoph Hellwig Question on the pre-existing code: given that nvdimm_check_and_set_ro is the only caller of set_disk_ro for nvdimm devices, we'll also get the message when initially setting up any read-only disk. Is that intentional

Re: [PATCH] libnvdimm: Let revalidate_disk() revalidate region read-only

2021-03-08 Thread Christoph Hellwig
On Mon, Mar 08, 2021 at 10:54:22PM -0800, Dan Williams wrote: > Previous kernels allowed the BLKROSET to override the disk's read-only > status. With that situation fixed the pmem driver needs to rely on > revalidate_disk() to clear the disk read-only status after the host > region has been marked

Re: [PATCH v3 02/11] blk: Introduce ->corrupted_range() for block device

2021-03-04 Thread Christoph Hellwig
On Thu, Mar 04, 2021 at 02:42:50PM -0800, Darrick J. Wong wrote: > My vision here, however, is to establish upcalls for /both/ types of > stroage. I already have patches for doing these kinds of callbacks properly for the block layer. They will be posted shortly.

Re: [PATCH v2 09/10] fs/xfs: Handle CoW for fsdax write() path

2021-03-03 Thread Christoph Hellwig
On Wed, Mar 03, 2021 at 09:57:48AM +, ruansy.f...@fujitsu.com wrote: > > What is the advantage of the ioemap_end handler here? It adds another > > indirect funtion call to the fast path, so if we can avoid it, I'd > > rather do that. > > These code were in xfs_file_dax_write(). I moved them

Re: [PATCH v2 05/10] fsdax: Replace mmap entry in case of CoW

2021-03-03 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v2 05/10] fsdax: Replace mmap entry in case of CoW

2021-03-03 Thread Christoph Hellwig
On Wed, Mar 03, 2021 at 09:41:54AM +, ruansy.f...@fujitsu.com wrote: > > > > > > > if (dirty) > > > __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); > > > > I still think the __mark_inode_dirty should just be moved into the one > > caller that needs it. > > I found that

Re: [PATCH v2 09/10] fs/xfs: Handle CoW for fsdax write() path

2021-03-03 Thread Christoph Hellwig
On Fri, Feb 26, 2021 at 08:20:29AM +0800, Shiyang Ruan wrote: > error = iomap_zero_range(VFS_I(ip), offset, len, NULL, > - _buffered_write_iomap_ops); > + IS_DAX(VFS_I(ip)) ? > + _dax_write_iomap_ops : _buffered_write_iomap_ops); Please add a

Re: [PATCH v2 06/10] fsdax: Add dax_iomap_cow_copy() for dax_iomap_zero

2021-03-03 Thread Christoph Hellwig
y: Shiyang Ruan Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v2 05/10] fsdax: Replace mmap entry in case of CoW

2021-03-03 Thread Christoph Hellwig
On Fri, Feb 26, 2021 at 08:20:25AM +0800, Shiyang Ruan wrote: > 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

Re: [PATCH v2 04/10] fsdax: Introduce dax_iomap_cow_copy()

2021-03-03 Thread Christoph Hellwig
to_kernel(daddr, saddr, length); Otherwise looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v2 02/10] fsdax: Factor helper: dax_fault_actor()

2021-03-03 Thread Christoph Hellwig
On Fri, Feb 26, 2021 at 08:20:22AM +0800, Shiyang Ruan wrote: > The core logic in the two dax page fault functions is similar. So, move > the logic into a common helper function. Also, to facilitate the > addition of new features, such as CoW, switch-case is no longer used to > handle different

Re: [PATCH v2 01/10] fsdax: Factor helpers to simplify dax fault code

2021-03-03 Thread Christoph Hellwig
gt; simplify the code. > > Signed-off-by: Shiyang Ruan Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function

2021-02-24 Thread Christoph Hellwig
On Thu, Feb 18, 2021 at 08:20:18AM -0800, Darrick J. Wong wrote: > > I think a nested call like this is necessary. That's why I use the open > > code way. > > This might be a good place to implement an iomap_apply2() loop that > actually /does/ walk all the extents of file1 and file2. There's

Re: [PATCH v3 05/11] mm, fsdax: Refactor memory-failure handler for dax mapping

2021-02-18 Thread Christoph Hellwig
On Wed, Feb 17, 2021 at 10:56:11AM +0800, Ruan Shiyang wrote: > I'd like to confirm one thing... I have checked all of this patchset by > checkpatch.pl and it did not report the overly long line warning. So, I > should still obey the rule of 80 chars one line? checkpatch.pl is completely

Re: [PATCH v3 10/11] xfs: Implement ->corrupted_range() for XFS

2021-02-10 Thread Christoph Hellwig
> + if (XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) || > + (rec->rm_flags & (XFS_RMAP_ATTR_FORK | XFS_RMAP_BMBT_BLOCK))) { > + // TODO check and try to fix metadata > + rc = -EFSCORRUPTED; > + xfs_force_shutdown(cur->bc_mp, SHUTDOWN_CORRUPT_META);

Re: [PATCH v3 06/11] mm, pmem: Implement ->memory_failure() in pmem driver

2021-02-10 Thread Christoph Hellwig
> +static int pmem_pagemap_memory_failure(struct dev_pagemap *pgmap, > + unsigned long pfn, int flags) > +{ > + struct pmem_device *pdev; > + struct gendisk *disk; > + loff_t disk_offset; > + int rc = 0; > + unsigned long size = page_size(pfn_to_page(pfn)); > + > +

Re: [PATCH v3 05/11] mm, fsdax: Refactor memory-failure handler for dax mapping

2021-02-10 Thread Christoph Hellwig
> +extern int mf_dax_mapping_kill_procs(struct address_space *mapping, pgoff_t > index, int flags); No nee for the extern, please avoid the overly long line. > @@ -120,6 +121,13 @@ static int hwpoison_filter_dev(struct page *p) > if (PageSlab(p)) > return -EINVAL; > > +

Re: [PATCH v3 02/11] blk: Introduce ->corrupted_range() for block device

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:21PM +0800, Shiyang Ruan wrote: > In fsdax mode, the memory failure happens on block device. So, it is > needed to introduce an interface for block devices. Each kind of block > device can handle the memory failure in ther own ways. As told before: DAX operations

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:20PM +0800, Shiyang Ruan wrote: > When memory-failure occurs, we call this function which is implemented > by each kind of devices. For the fsdax case, pmem device driver > implements it. Pmem device driver will find out the block device where > the error page

Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function

2021-02-10 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 05:46:13PM +0800, Ruan Shiyang wrote: > > > On 2021/2/9 下午5:34, Christoph Hellwig wrote: >> On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: >>> The dax dedupe comparison need the iomap_ops pointer as argument, so my >>> unde

Re: [PATCH v3 11/11] fs/dax: Remove useless functions

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:30PM +0800, Shiyang Ruan wrote: > Since owner tarcking is triggerred by pmem device, these functions are s/tarcking/tracking/ > useless. So remove them. Note that this patch does not apply for me when applying your two series on top of 5.11-rc5.

Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: > The dax dedupe comparison need the iomap_ops pointer as argument, so my > understanding is that we don't modify the argument list of > generic_remap_file_range_prep(), but move its code into > __generic_remap_file_range_prep()

Re: [PATCH 6/7] fs/xfs: Handle CoW for fsdax write() path

2021-02-08 Thread Christoph Hellwig
> --- a/fs/xfs/xfs_bmap_util.c > +++ b/fs/xfs/xfs_bmap_util.c > @@ -977,10 +977,14 @@ xfs_free_file_space( > if (offset + len > XFS_ISIZE(ip)) > len = XFS_ISIZE(ip) - offset; > error = iomap_zero_range(VFS_I(ip), offset, len, NULL, > -

Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function

2021-02-08 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 01:09:22AM +0800, Shiyang Ruan wrote: > With dax we cannot deal with readpage() etc. So, we create a > funciton callback to perform the file data comparison and pass s/funciton/function/g > +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) This should use the existing min or

Re: [PATCH 4/7] fsdax: Replace mmap entry in case of CoW

2021-02-08 Thread Christoph Hellwig
> static void *dax_insert_entry(struct xa_state *xas, > struct address_space *mapping, struct vm_fault *vmf, > - void *entry, pfn_t pfn, unsigned long flags, bool dirty) > + void *entry, pfn_t pfn, unsigned long flags, bool insert_flags) > { > void

Re: [PATCH 3/7] fsdax: Copy data before write

2021-02-08 Thread Christoph Hellwig
> switch (iomap.type) { > case IOMAP_MAPPED: > +cow: > if (iomap.flags & IOMAP_F_NEW) { > count_vm_event(PGMAJFAULT); > count_memcg_event_mm(vma->vm_mm, PGMAJFAULT); > major = VM_FAULT_MAJOR; >

Re: [PATCH 2/7] fsdax: Introduce dax_copy_edges() for CoW

2021-02-08 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 01:09:19AM +0800, Shiyang Ruan wrote: > dax_copy_edges() is a helper functions performs a copy from one part of > the device to another for data not page aligned. The function looks good to me, but adding a static function without a user is not very bisection friendly.

Re: [PATCH 1/7] fsdax: Output address in dax_iomap_pfn() and rename it

2021-02-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-03 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 01:23:31PM -0800, Dan Williams wrote: > > I'd prefer to keep the helpers for now as I do find them helpful, and so far > > nobody else who has touched the code has complained. If you feel strongly, I > > will change it. > > After seeing the options, I think I'd prefer to

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-03 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 10:24:18AM -0800, Ben Widawsky wrote: > > > + /* Cap 4000h - CXL_CAP_CAP_ID_MEMDEV */ > > > + struct { > > > + void __iomem *regs; > > > + } mem; > > > > This style looks massively obsfucated. For one the comments look like > > absolute gibberish, but also what is

Re: [PATCH 02/14] cxl/mem: Map memory device registers

2021-02-03 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 10:31:51AM -0800, Ben Widawsky wrote: > > > + if (reg_type == CXL_REGLOC_RBI_MEMDEV) { > > > + rc = 0; > > > + cxlm = cxl_mem_create(pdev, reg_lo, reg_hi); > > > + if (!cxlm) > > > + rc =

Re: [PATCH 06/14] cxl/mem: Add basic IOCTL interface

2021-02-02 Thread Christoph Hellwig
> +#if defined(__cplusplus) > +extern "C" { > +#endif This has no business in a kernel header. ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 05/14] cxl/mem: Register CXL memX devices

2021-02-02 Thread Christoph Hellwig
> diff --git a/drivers/base/core.c b/drivers/base/core.c > index 25e08e5f40bd..33432a4cbe23 100644 > --- a/drivers/base/core.c > +++ b/drivers/base/core.c > @@ -3179,6 +3179,20 @@ struct device *get_device(struct device *dev) > } > EXPORT_SYMBOL_GPL(get_device); > > +/** > + *

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-02 Thread Christoph Hellwig
On Fri, Jan 29, 2021 at 04:24:27PM -0800, Ben Widawsky wrote: > #ifndef __CXL_H__ > #define __CXL_H__ > > +#include > +#include > +#include > + > +#define CXL_SET_FIELD(value, field) > \ > + ({

Re: [PATCH 02/14] cxl/mem: Map memory device registers

2021-02-02 Thread Christoph Hellwig
Any reason not to merge a bunch of patches? Both this one and the previous one are rather useless on their own, making review harder than necessary. > + * cxl_mem_create() - Create a new cxl_mem. > + * @pdev: The pci device associated with the new cxl_mem. > + * @reg_lo: Lower 32b of the

Re: [PATCH 01/14] cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints

2021-02-02 Thread Christoph Hellwig
> +static int cxl_mem_dvsec(struct pci_dev *pdev, int dvsec) > +{ > + int pos; > + > + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_DVSEC); > + if (!pos) > + return 0; > + > + while (pos) { > + u16 vendor, id; > + > +

Re: [PATCH 01/14] cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints

2021-02-02 Thread Christoph Hellwig
On Mon, Feb 01, 2021 at 12:34:11PM -0500, Konrad Rzeszutek Wilk wrote: > > +// SPDX-License-Identifier: GPL-2.0-only > > +/* Copyright(c) 2020 Intel Corporation. All rights reserved. */ > > Can those two comments have the same type? As in either > stay with // or do /*. No. // is only intended

Re: [PATCH 1/3] cdev: Finish the cdev api with queued mode support

2021-01-20 Thread Christoph Hellwig
The subject doesn't make any sense to me. But thn again queued sound really weird. You just have a managed API with a refcount and synchronization, right? procfs and debugfs already support these kind of managed ops, kinda sad to duplicate this concept yet another time. > +static long

Re: [PATCH 03/10] fs: Introduce ->corrupted_range() for superblock

2021-01-08 Thread Christoph Hellwig
On Thu, Dec 31, 2020 at 12:55:54AM +0800, Shiyang Ruan wrote: > Memory failure occurs in fsdax mode will finally be handled in > filesystem. We introduce this interface to find out files or metadata > affected by the corrupted range, and try to recover the corrupted data > if possiable. > >

Re: [PATCH 02/10] blk: Introduce ->corrupted_range() for block device

2021-01-08 Thread Christoph Hellwig
It happens on a dax_device. We should not interwind dax and block_device even more after a lot of good work has happened to detangle them. ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to

Re: [PATCH RFC 9/9] mm: Add follow_devmap_page() for devdax vmas

2020-12-09 Thread Christoph Hellwig
On Tue, Dec 08, 2020 at 03:57:54PM -0400, Jason Gunthorpe wrote: > What we've talked about is changing the calling convention across all > of this to something like: > > struct gup_output { >struct page **cur; >struct page **end; >unsigned long vaddr; >[..] > } > > And making the

Re: [PATCH v3 3/6] mm: support THP migration to device private memory

2020-12-02 Thread Christoph Hellwig
[adding a few of the usual suspects] On Wed, Nov 11, 2020 at 03:38:42PM -0800, Ralph Campbell wrote: > There are 4 types of ZONE_DEVICE struct pages: > MEMORY_DEVICE_PRIVATE, MEMORY_DEVICE_FS_DAX, MEMORY_DEVICE_GENERIC, and > MEMORY_DEVICE_PCI_P2PDMA. > > Currently, memremap_pages() allocates

Re: [PATCH 2/2] mm: simplify follow_pte{,pmd}

2020-11-11 Thread Christoph Hellwig
On Wed, Nov 11, 2020 at 09:26:20AM +0100, Christian Borntraeger wrote: > > On 11.11.20 09:18, Christoph Hellwig wrote: > > On Tue, Nov 10, 2020 at 06:21:22PM -0800, Nick Desaulniers wrote: > >> Sorry, I think this patch may be causing a regression for us for s390? >

Re: [PATCH 2/2] mm: simplify follow_pte{,pmd}

2020-11-11 Thread Christoph Hellwig
On Tue, Nov 10, 2020 at 06:21:22PM -0800, Nick Desaulniers wrote: > Sorry, I think this patch may be causing a regression for us for s390? > https://travis-ci.com/github/ClangBuiltLinux/continuous-integration/jobs/432129279#L768 > > (via

Re: simplify follow_pte a bit

2020-11-10 Thread Christoph Hellwig
On Thu, Oct 29, 2020 at 11:14:30AM +0100, Christoph Hellwig wrote: > Hi Andrew, > > this small series drops the not needed follow_pte_pmd exports, and > simplifies the follow_pte family of functions a bit. any comments? ___ Linux-nvdimm

Re: [PATCH] x86/mm: Fix phys_to_target_node() export

2020-11-03 Thread Christoph Hellwig
This version looks sensible to me: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH] x86/mm: Fix phys_to_target_node() export

2020-10-31 Thread Christoph Hellwig
On Thu, Oct 29, 2020 at 07:29:45PM -0700, Dan Williams wrote: > The core-mm has a default __weak implementation of phys_to_target_node() > when the architecture does not override it. That symbol is exported > for modules. However, while the export in mm/memory_hotplug.c exported > the symbol in

[PATCH 2/2] mm: simplify follow_pte{,pmd}

2020-10-29 Thread Christoph Hellwig
Merge __follow_pte_pmd, follow_pte_pmd and follow_pte into a single follow_pte function and just pass two additional NULL arguments for the two previous follow_pte callers. Signed-off-by: Christoph Hellwig --- fs/dax.c | 9 - include/linux/mm.h | 6 +++--- mm/memory.c

[PATCH 1/2] mm: unexport follow_pte_pmd

2020-10-29 Thread Christoph Hellwig
follow_pte_pmd is only used by the DAX code, which can't be modular. Signed-off-by: Christoph Hellwig --- mm/memory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index c48f8df6e50268..00458e7b49fef8 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4787,7 +4787,6

simplify follow_pte a bit

2020-10-29 Thread Christoph Hellwig
Hi Andrew, this small series drops the not needed follow_pte_pmd exports, and simplifies the follow_pte family of functions a bit. ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH] mm/mremap_pages: Fix static key devmap_managed_key updates

2020-10-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH] mm/mremap_pages: Fix static key devmap_managed_key updates

2020-10-23 Thread Christoph Hellwig
ite+0x6c/0xb0 > > > [c00025c1fc90] [c06d2328] kernfs_fop_write+0x118/0x280 > > > [c00025c1fce0] [c05a79f8] vfs_write+0xe8/0x2a0 > > > [c00025c1fd30] [c05a7d94] ksys_write+0x84/0x140 > > > [c00025c1fd80] [c000

Re: [PATCH] mm/mremap_pages: Fix static key devmap_managed_key updates

2020-10-22 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [ndctl PATCH] Clarify COPYING

2020-10-16 Thread Christoph Hellwig
On Thu, Oct 15, 2020 at 06:12:22PM -0700, Dan Williams wrote: > The tools and the libraries this project produces are licensed under the > GPLv2 and LGPLv2.1 licenses respectively. Add a COPYING file that > highlights this arrangement and fixup files in */lib that mistakenly had > a GPLv2 header

Re: [PATCH v2 00/22] add Object Storage Media Pool (mpool)

2020-10-15 Thread Christoph Hellwig
I don't think this belongs into the kernel. It is a classic case for infrastructure that should be built in userspace. If anything is missing to implement it in userspace with equivalent performance we need to improve out interfaces, although io_uring should cover pretty much everything you

Re: [PATCH RFC PKS/PMEM 24/58] fs/freevxfs: Utilize new kmap_thread()

2020-10-13 Thread Christoph Hellwig
> - kaddr = kmap(pp); > + kaddr = kmap_thread(pp); > memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE); > - kunmap(pp); > + kunmap_thread(pp); You only Cced me on this particular patch, which means I have absolutely no idea what kmap_thread and kunmap_thread

Re: [PATCH] pmem: export the symbols __copy_user_flushcache and __copy_from_user_flushcache

2020-09-17 Thread Christoph Hellwig
On Wed, Sep 16, 2020 at 10:40:13AM -0700, Dan Williams wrote: > > Before nvfs gets included in the kernel, I need to distribute it as a > > module. So, it would make my maintenance easier. But if you don't want to > > export it now, no problem, I can just copy __copy_user_flushcache from the > >

Re: [PATCH v2 9/9] iomap: Change calling convention for zeroing

2020-09-11 Thread Christoph Hellwig
ally take > advantage of it if there's a larger contiguous area. Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v2 6/9] iomap: Convert read_count to read_bytes_pending

2020-09-10 Thread Christoph Hellwig
> Signed-off-by: Matthew Wilcox (Oracle) Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v2 5/9] iomap: Support arbitrarily many blocks per page

2020-09-10 Thread Christoph Hellwig
4kB > per page. Add a few debugging assertions. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Dave Chinner Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe s

Re: [PATCH 2/2] xfs: don't update mtime on COW faults

2020-09-07 Thread Christoph Hellwig
> +static bool > +xfs_is_write_fault( > + struct vm_fault *vmf) > +{ > + return vmf->flags & FAULT_FLAG_WRITE && vmf->vma->vm_flags & VM_SHARED; > +} This function does not look xfs specific at all. Why isn't it it in fs.h? While we're at it the name sounds rather generic, and

[PATCH 8/9] nvdimm: simplify revalidate_disk handling

2020-09-01 Thread Christoph Hellwig
, and remove the revalidate_disk methods given that it can only be triggered from add_disk, which is right before the manual calls. Signed-off-by: Christoph Hellwig --- drivers/nvdimm/blk.c | 3 +-- drivers/nvdimm/btt.c | 3 +-- drivers/nvdimm/bus.c | 9 +++-- drivers/nvdimm/nd.h | 2 +- drivers

[PATCH 5/9] block: use revalidate_disk_size in set_capacity_revalidate_and_notify

2020-09-01 Thread Christoph Hellwig
Only virtio_blk and xen-blkfront set the revalidate argument to true, and both do not implement the ->revalidate_disk method. So switch to the helper that just updates the size instead. Signed-off-by: Christoph Hellwig --- block/genhd.c | 7 +++ include/linux/genhd.h | 4 ++--

[PATCH 6/9] nvme: opencode revalidate_disk in nvme_validate_ns

2020-09-01 Thread Christoph Hellwig
called from the open code when first opening the device. Which is of course totally pointless as we have a valid size since the initial scan, and will get an updated view through the asynchronous notifiation everytime the size changes. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.

[PATCH 4/9] block: add a new revalidate_disk_size helper

2020-09-01 Thread Christoph Hellwig
helper that just performs the update of the block device size from the gendisk one, and switch all drivers that do not implement ->revalidate_disk to use the new helper instead of revalidate_disk() Signed-off-by: Christoph Hellwig --- drivers/block/rbd.c | 2 +- drivers/block/rnbd/r

[PATCH 3/9] block: rename bd_invalidated

2020-09-01 Thread Christoph Hellwig
Replace bd_invalidate with a new BDEV_NEED_PART_SCAN flag in a bd_flags variable to better describe the condition. Signed-off-by: Christoph Hellwig --- block/genhd.c | 2 +- drivers/block/nbd.c | 8 fs/block_dev.c| 10 +- include/linux

[PATCH 2/9] block: don't clear bd_invalidated in check_disk_size_change

2020-09-01 Thread Christoph Hellwig
with the bd_invalidated event. revalidate_disk() on the other hand is mostly used to propagate a size update from the gendisk to the block device, which is entirely unrelated. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs

[PATCH 7/9] sd: open code revalidate_disk

2020-09-01 Thread Christoph Hellwig
Instead of calling revalidate_disk just do the work directly by calling sd_revalidate_disk, and revalidate_disk_size where needed. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi

[PATCH 9/9] block: remove revalidate_disk()

2020-09-01 Thread Christoph Hellwig
Remove the now unused helper. Signed-off-by: Christoph Hellwig --- drivers/md/md.h | 2 +- fs/block_dev.c| 19 --- include/linux/genhd.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/md/md.h b/drivers/md/md.h index d9c4e6b7e9398d

remove revalidate_disk()

2020-09-01 Thread Christoph Hellwig
Hi Jens, this series removes the revalidate_disk() function, which has been a really odd duck in the last years. The prime reason why most people use it is because it propagates a size change from the gendisk to the block_device structure. But it also calls into the rather ill defined

[PATCH 1/9] Documentation/filesystems/locking.rst: remove an incorrect sentence

2020-09-01 Thread Christoph Hellwig
unlock_native_capacity is never called from check_disk_change(), and while revalidate_disk can be called from it, it can also be called from two other places at the moment. Signed-off-by: Christoph Hellwig --- Documentation/filesystems/locking.rst | 3 --- 1 file changed, 3 deletions(-) diff

Re: [PATCH 8/9] iomap: Convert iomap_write_end types

2020-08-27 Thread Christoph Hellwig
; ever wants to support a page size larger than 2GB. > > Signed-off-by: Matthew Wilcox (Oracle) Looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-27 Thread Christoph Hellwig
On Tue, Aug 25, 2020 at 03:23:55PM -0700, Darrick J. Wong wrote: > Sorry for my ultra-slow response to this. The u64 length seems ok to me > (or uint64_t, I don't care all /that/ much), but using loff_t as a > return type bothers me because I see that and think that this function > is returning a

Re: [PATCH 7/9] iomap: Convert write_count to byte count

2020-08-27 Thread Christoph Hellwig
ooks good (module the field naming as comment on the previous patch): Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 6/9] iomap: Convert read_count to byte count

2020-08-27 Thread Christoph Hellwig
> @@ -269,20 +263,17 @@ iomap_readpage_actor(struct inode *inode, loff_t pos, > loff_t length, void *data, > if (ctx->bio && bio_end_sector(ctx->bio) == sector) > is_contig = true; > > - > /* > - * If we start a new segment we need to increase the read count, and

Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-27 Thread Christoph Hellwig
n empty line after the VM_BUG_ON_PGFLAGS assert to keep the function readable? Maybe also add a comment on the assert, as it isn't totally obvious. Otherwise looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org T

Re: [PATCH 1/9] iomap: Fix misplaced page flushing

2020-08-27 Thread Christoph Hellwig
asserts. Otherwise looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v2 11/12] PM, libnvdimm: Add 'mem-quiet' state and callback for firmware activation

2020-07-09 Thread Christoph Hellwig
On Mon, Jul 06, 2020 at 06:59:32PM -0700, Dan Williams wrote: > The runtime firmware activation capability of Intel NVDIMM devices > requires memory transactions to be disabled for 100s of microseconds. > This timeout is large enough to cause in-flight DMA to fail and other > application

Re: [PATCH 18/20] block: refator submit_bio_noacct

2020-07-02 Thread Christoph Hellwig
On Thu, Jul 02, 2020 at 10:10:10AM -0400, Qian Cai wrote: > On Mon, Jun 29, 2020 at 09:39:45PM +0200, Christoph Hellwig wrote: > > Split out a __submit_bio_noacct helper for the actual de-recursion > > algorithm, and simplify the loop by using a continue when we can't > > ente

[PATCH 12/20] block: remove the request_queue argument from blk_queue_split

2020-07-01 Thread Christoph Hellwig
The queue can be trivially derived from the bio, so pass one less argument. Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 21 ++--- block/blk-mq.c| 2 +- block/blk.h | 3 +-- drivers/block/drbd/drbd_req.c | 2

[PATCH 07/20] umem: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/umem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 1e2aa5ae27963c..5498f1cf36b3fe 100644

[PATCH 16/20] block: move ->make_request_fn to struct block_device_operations

2020-07-01 Thread Christoph Hellwig
be derived pretty trivially from the bio. Signed-off-by: Christoph Hellwig --- Documentation/block/biodoc.rst| 2 +- .../block/writeback_cache_control.rst | 2 +- arch/m68k/emu/nfblock.c | 5 +- arch/xtensa/platforms/iss/simdisk.c | 5

[PATCH 03/20] drbd: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_main.c | 1 - drivers/block/drbd/drbd_req.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c b/drivers

[PATCH 20/20] block: remove direct_make_request

2020-07-01 Thread Christoph Hellwig
Now that submit_bio_noacct has a decent blk-mq fast path there is no more need for this bypass. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 28 drivers/md/dm.c | 5 + drivers/nvme/host/multipath.c | 2 +- include/linux

[PATCH 06/20] rsxx: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/rsxx/dev.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index 3ba07ab30c84f5

[PATCH 19/20] block: shortcut __submit_bio_noacct for blk-mq drivers

2020-07-01 Thread Christoph Hellwig
For blk-mq drivers bios can only be inserted for the same queue. So bypass the complicated sorting logic in __submit_bio_noacct with a blk-mq simpler submission helper. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 30 ++ 1 file changed, 30 insertions

rename ->make_request_fn and move it to the block_device_operations v2

2020-07-01 Thread Christoph Hellwig
Hi Jens, this series moves the make_request_fn method into block_device_operations with the much more descriptive ->submit_bio name. It then also gives generic_make_request a more descriptive name, and further optimize the path to issue to blk-mq, removing the need for the direct_make_request

[PATCH 02/20] simdisk: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- arch/xtensa/platforms/iss/simdisk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c

[PATCH 05/20] ps3vram: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/ps3vram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 821d4d8b1d763e..5a1d1d137c7248

[PATCH 10/20] dm: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/md/dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index e44473fe0f4873..c8d91f271c272e 100644 --- a/drivers/md

[PATCH 04/20] null_blk: stop using ->queuedata for bio mode

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/null_blk_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 82259242b9b5c9

[PATCH 08/20] zram: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/zram/zram_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index

[PATCH 14/20] block: remove the NULL queue check in generic_make_request_checks

2020-07-01 Thread Christoph Hellwig
All registers disks must have a valid queue pointer, so don't bother to log a warning for that case. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 95dca74534ff73

  1   2   3   4   5   6   7   8   9   >