Re: [RFC v3 2/2] pmem: enable pmem_submit_bio for asynchronous flush

2022-02-15 Thread Dan Williams
On Tue, Jan 11, 2022 at 8:21 AM Pankaj Gupta wrote: > > Return from "pmem_submit_bio" when asynchronous flush is > still in progress in other context. > > Signed-off-by: Pankaj Gupta > --- > drivers/nvdimm/pmem.c| 15 --- > drivers/nvdimm/region_devs.c | 4 +++- > 2 files

Re: [RFC v3 1/2] virtio-pmem: Async virtio-pmem flush

2022-02-15 Thread Dan Williams
On Tue, Jan 11, 2022 at 8:23 AM Pankaj Gupta wrote: > > Enable asynchronous flush for virtio pmem using work queue. Also, > coalesce the flush requests when a flush is already in process. > This functionality is copied from md/RAID code. > > When a flush is already in process, new flush requests

Re: [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings

2022-02-15 Thread Dan Williams
On Tue, Feb 15, 2022 at 6:55 PM Shiyang Ruan wrote: > > > > 在 2022/2/16 10:09, Dan Williams 写道: > > On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan > > wrote: > >> > >> Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file > >> mappings. In this case, the dax-RMAP already

Re: [PATCH v10 5/9] fsdax: Introduce dax_load_page()

2022-02-15 Thread Dan Williams
On Tue, Feb 15, 2022 at 7:02 PM Shiyang Ruan wrote: > > > > 在 2022/2/16 9:34, Dan Williams 写道: > > On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan > > wrote: > >> > >> The current dax_lock_page() locks dax entry by obtaining mapping and > >> index in page. To support 1-to-N RMAP in NVDIMM, we

Re: [PATCH v10 5/9] fsdax: Introduce dax_load_page()

2022-02-15 Thread Shiyang Ruan
在 2022/2/16 9:34, Dan Williams 写道: On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: The current dax_lock_page() locks dax entry by obtaining mapping and index in page. To support 1-to-N RMAP in NVDIMM, we need a new function to lock a specific dax entry I do not see a call to

Re: [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings

2022-02-15 Thread Shiyang Ruan
在 2022/2/16 10:09, Dan Williams 写道: On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file mappings. In this case, the dax-RMAP already takes the responsibility to look up for shared files by given dax page. The

Re: [PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file > mappings. In this case, the dax-RMAP already takes the responsibility > to look up for shared files by given dax page. The page->mapping is no > longer to used

Re: [PATCH v10 8/9] xfs: Implement ->notify_failure() for XFS

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > Introduce xfs_notify_failure.c to handle failure related works, such as > implement ->notify_failure(), register/unregister dax holder in xfs, and > so on. > > If the rmap feature of XFS enabled, we can query it to find files and > metadata

Re: [PATCH v10 7/9] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > This function is called at the end of RMAP routine, i.e. filesystem > recovery function, to collect and kill processes using a shared page of > DAX file. The difference with mf_generic_kill_procs() is, it accepts > file's (mapping,offset)

Re: [PATCH v10 7/9] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > This function is called at the end of RMAP routine, i.e. filesystem > recovery function, to collect and kill processes using a shared page of > DAX file. The difference with mf_generic_kill_procs() is, it accepts > file's (mapping,offset)

Re: [PATCH v10 6/9] mm: move pgoff_address() to vma_pgoff_address()

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > Since it is not a DAX-specific function, move it into mm and rename it > to be a generic helper. > > Signed-off-by: Shiyang Ruan > Reviewed-by: Christoph Hellwig Looks ok to me. Reviewed-by: Dan Williams

Re: [PATCH v10 5/9] fsdax: Introduce dax_load_page()

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > The current dax_lock_page() locks dax entry by obtaining mapping and > index in page. To support 1-to-N RMAP in NVDIMM, we need a new function > to lock a specific dax entry I do not see a call to dax_lock_entry() in this function, what

Re: [PATCH v10 4/9] fsdax: fix function description

2022-02-15 Thread Dan Williams
On Wed, Feb 2, 2022 at 5:04 AM Christoph Hellwig wrote: > > Dan, can you send this to Linus for 5.17 to get it out of the queue? Sure.

Re: [PATCH v10 3/9] pagemap,pmem: Introduce ->memory_failure()

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM 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 filesystem in which > the corrupted page located

Re: [PATCH v10 2/9] mm: factor helpers for memory_failure_dev_pagemap

2022-02-15 Thread Dan Williams
On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan wrote: > > memory_failure_dev_pagemap code is a bit complex before introduce RMAP > feature for fsdax. So it is needed to factor some helper functions to > simplify these code. > > Signed-off-by: Shiyang Ruan > Reviewed-by: Darrick J. Wong >

Re: [PATCH v10.1 1/9] dax: Introduce holder for dax_device

2022-02-15 Thread Dan Williams
On Sun, Feb 13, 2022 at 4:58 AM Shiyang Ruan wrote: > > v10.1 update: > - Fix build error reported by kernel test robot > - Add return code to dax_register_holder() > - Add write lock to prevent concurrent registrations > - Rename dax_get_holder() to dax_holder() > - Add kernel doc for new

Re: [PATCH v9 02/10] dax: Introduce holder for dax_device

2022-02-15 Thread Dan Williams
On Thu, Jan 20, 2022 at 6:22 PM Darrick J. Wong wrote: > > On Fri, Jan 21, 2022 at 09:26:52AM +0800, Shiyang Ruan wrote: > > > > > > 在 2022/1/20 16:46, Christoph Hellwig 写道: > > > On Wed, Jan 05, 2022 at 04:12:04PM -0800, Dan Williams wrote: > > > > We ended up with explicit callbacks after hch

Re: [PATCH v10.1 8/9] xfs: Implement ->notify_failure() for XFS

2022-02-15 Thread Shiyang Ruan
在 2022/2/15 9:46, Darrick J. Wong 写道: On Sun, Feb 13, 2022 at 09:02:24PM +0800, Shiyang Ruan wrote: v10.1 update: - Handle the error code returns by dax_register_holder() - In v10.1, dax_register_holder() will hold a write lock so XFS doesn't need to hold a lock - Fix the mistake