Re: [PATCH v7 6/6] pmem: implement pmem_recovery_write()

2022-04-05 Thread Christoph Hellwig
On Tue, Apr 05, 2022 at 01:47:47PM -0600, Jane Chu wrote: > + off = (unsigned long)addr & ~PAGE_MASK; offset_inpage() > + if (off || !(PAGE_ALIGNED(bytes))) { No need for the inner braces. > + mutex_lock(>recovery_lock); > + pmem_off = PFN_PHYS(pgoff) + pmem->data_offset; > +

Re: [PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops

2022-04-05 Thread Christoph Hellwig
On Tue, Apr 05, 2022 at 01:47:45PM -0600, Jane Chu wrote: > Introduce DAX_RECOVERY flag to dax_direct_access(). The flag is > not set by default in dax_direct_access() such that the helper > does not translate a pmem range to kernel virtual address if the > range contains uncorrectable errors.

Re: [PATCH v7 5/6] pmem: refactor pmem_clear_poison()

2022-04-05 Thread Christoph Hellwig
On Tue, Apr 05, 2022 at 01:47:46PM -0600, Jane Chu wrote: > + pmem_clear_bb(pmem, to_sect(pmem, offset), cleared >> SECTOR_SHIFT); > + return (cleared < len) ? BLK_STS_IOERR : BLK_STS_OK; No need for the braces. That being said perosnally I find a simple: if (cleared < len)

Re: [PATCH v7 3/6] mce: fix set_mce_nospec to always unmap the whole page

2022-04-05 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH v7 2/6] x86/mce: relocate set{clear}_mce_nospec() functions

2022-04-05 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [dm-devel] [RFC PATCH] io_uring: reissue in case -EAGAIN is returned after io issue returns

2022-04-05 Thread Ming Lei
On Mon, Apr 04, 2022 at 12:51:30PM -0400, Mike Snitzer wrote: > On Sun, Apr 03 2022 at 7:45P -0400, > Ming Lei wrote: > > > -EAGAIN still may return after io issue returns, and REQ_F_REISSUE is > > set in io_complete_rw_iopoll(), but the req never gets chance to be handled. > > io_iopoll_check

[PATCH v7 2/6] x86/mce: relocate set{clear}_mce_nospec() functions

2022-04-05 Thread Jane Chu
Relocate the twin mce functions to arch/x86/mm/pat/set_memory.c file where they belong. Signed-off-by: Jane Chu --- arch/x86/include/asm/set_memory.h | 52 --- arch/x86/mm/pat/set_memory.c | 47 include/linux/set_memory.h| 9

[dm-devel] [PATCH v7 1/6] x86/mm: fix comment

2022-04-05 Thread Jane Chu
There is no _set_memory_prot internal helper, while coming across the code, might as well fix the comment. Reviewed-by: Christoph Hellwig Signed-off-by: Jane Chu --- arch/x86/mm/pat/set_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/pat/set_memory.c

[dm-devel] [PATCH v7 3/6] mce: fix set_mce_nospec to always unmap the whole page

2022-04-05 Thread Jane Chu
The set_memory_uc() approach doesn't work well in all cases. For example, when "The VMM unmapped the bad page from guest physical space and passed the machine check to the guest." "The guest gets virtual #MC on an access to that page. When the guest tries to do set_memory_uc() and instructs

[PATCH v7 5/6] pmem: refactor pmem_clear_poison()

2022-04-05 Thread Jane Chu
Refactor the pmem_clear_poison() in order to share common code later. Signed-off-by: Jane Chu --- drivers/nvdimm/pmem.c | 78 --- 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index

[PATCH v7 6/6] pmem: implement pmem_recovery_write()

2022-04-05 Thread Jane Chu
The recovery write thread started out as a normal pwrite thread and when the filesystem was told about potential media error in the range, filesystem turns the normal pwrite to a dax_recovery_write. The recovery write consists of clearing media poison, clearing page HWPoison bit, reenable

[PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write dev_pgmap_ops

2022-04-05 Thread Jane Chu
Introduce DAX_RECOVERY flag to dax_direct_access(). The flag is not set by default in dax_direct_access() such that the helper does not translate a pmem range to kernel virtual address if the range contains uncorrectable errors. When the flag is set, the helper ignores the UEs and return kernel

[PATCH v7 0/6] DAX poison recovery

2022-04-05 Thread Jane Chu
In this series, dax recovery code path is independent of that of normal write. Competing dax recovery threads are serialized, racing read threads are guaranteed not overlapping with the recovery process. In this phase, the recovery granularity is page, future patch will explore recovery in finer

Re: [dm-devel] [RFC PATCH] md: dm-init: Wait devices if it's not find on first adpet

2022-04-05 Thread Mike Snitzer
On Fri, Apr 01 2022 at 6:07P -0400, Michael Trimarchi wrote: > The device driver can be deferrable and can be a race during > the dm-init early. We need to wait all the probe are really finished > in a loop as is done in do_mounts. This is was tested on kernel 5.4 > but code seems was not

[dm-devel] [powerpc]Kernel crash while running xfstests (generic/250) [next-20220404]

2022-04-05 Thread Sachin Sant
While running xfstests(ext4 or XFS as fs) on a Power10 LPAR booted with today’s next (5.18.0-rc1-next-20220404) following crash is seen. [ 51.260209] XFS (dm-0): Unmounting Filesystem [ 51.262949] XFS (dm-0): Mounting V5 Filesystem [ 51.270524] XFS (dm-0): Ending clean mount [ 51.272641]