All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3 v5] dax: some dax fixes and cleanups
@ 2015-04-07  8:33 ` Boaz Harrosh
  0 siblings, 0 replies; 34+ messages in thread
From: Boaz Harrosh @ 2015-04-07  8:33 UTC (permalink / raw)
  To: Dave Chinner, Matthew Wilcox, Andrew Morton, Kirill A. Shutemov,
	Jan Kara, Hugh Dickins, Mel Gorman, linux-mm, linux-nvdimm,
	linux-fsdevel, Eryu Guan, Christoph Hellwig
  Cc: Stable Tree

Hi Andrew

I finally had the time to beat up these fixes based on linux-next/akpm
and it looks OK.
I'm sending the two fix patches with @stable + a patch-1 for the 4.0
Kernel. The 4.1-rc Kernel will need a different patch.

It is your call if you want these in stable. It is a breakage in the dax
code that went into 4.0. But I guess it will not have that many users right
at the get go. So feel free to remove the CC:@stable. (Also the old XIP that
this DAX changed had all the same problems)

[v5]
* A new patch-1 Based on linux-next/akpm branch because mm/memory.c
  completely changed there.
  Also a 4.0 version of the same patch-1 if needed for stable@

List of patches:
 [PATCH 1/3] mm(v4.1): New pfn_mkwrite same as page_mkwrite for VM_PFNMAP
 [PATCH 2/3] dax: use pfn_mkwrite to update c/mtime + freeze
 [PATCH 3/3] dax: Unify ext2/4_{dax,}_file_operations

	All these patches are based on linux-next/akpm. I'm not sure how
	it will interact with ext4-next though.

 [PATCH 1/3 @stable] mm(v4.0): New pfn_mkwrite same as page_mkwrite for VM_PFNMAP

	This patch is for 4.0 based tree if we decide to send
	[PATCH 2/3] to stable.


[v4] dax: some dax fixes and cleanups
* First patch fixed according to Andrew's comments. Thanks Andrew.
  1st and 2nd patch can go into current Kernel as they fix something
  that was merged this release.
* Added a new patch to fix up splice in the dax case, and cleanup.
  This one can wait for 4.1 (Also the first two not that anyone uses dax
  in production.)
* DAX freeze is not fixed yet. As we have more problems then I originally
  hoped for, as pointed out by Dave.
  (Just as a referance I'm sending a NO-GOOD additional patch to show what
   is not good enough to do. Was the RFC of [v3])
* Not re-posting the xfstest Dave please pick this up (It already found bugs
  in none dax FSs)

[v3] dax: Fix mmap-write not updating c/mtime
* I'm re-posting the two DAX patches that fix the mmap-write after read
  problem with DAX. (No changes since [v2])
* I'm also posting a 3rd RFC patch to address what Jan said about fs_freeze
  and making mapping read-only. 
  Jan Please review and see if this is what you meant.

[v2]
Jan Kara has pointed out that if we add the
sb_start/end_pagefault pair in the new pfn_mkwrite we
are then fixing another bug where: A user could start
writing to the page while filesystem is frozen.

[v1]
The main problem is that current mm/memory.c will no call us with page_mkwrite
if we do not have an actual page mapping, which is what DAX uses.
The solution presented here introduces a new pfn_mkwrite to solve this problem.
Please see patch-2 for details.

I've been running with this patch for 4 month both HW and VMs with no apparent
danger, but see patch-1 I played it safe.

I am also posting an xfstest 080 that demonstrate this problem, I believe
that also some git operations (can't remember which) suffer from this problem.
Actually Eryu Guan found that this test fails on some other FS as well.

Matthew hi
I would love to have your ACK on these patches?

Thanks
Boaz

^ permalink raw reply	[flat|nested] 34+ messages in thread
* [PATCH 0/3 v3] dax: Fix mmap-write not updating c/mtime
@ 2015-03-23 12:47 Boaz Harrosh
  2015-03-23 12:52 ` [PATCH 2/3] dax: use pfn_mkwrite to update c/mtime + freeze protection Boaz Harrosh
  0 siblings, 1 reply; 34+ messages in thread
From: Boaz Harrosh @ 2015-03-23 12:47 UTC (permalink / raw)
  To: Dave Chinner, Matthew Wilcox, Andrew Morton, Kirill A. Shutemov,
	Jan Kara, Hugh Dickins, Mel Gorman, linux-mm, linux-nvdimm,
	linux-fsdevel, Eryu Guan

Hi

[v3]
* I'm re-posting the two DAX patches that fix the mmap-write after read
  problem with DAX. (No changes since [v2])
* I'm also posting a 3rd RFC patch to address what Jan said about fs_freeze
  and making mapping read-only. 
  Jan Please review and see if this is what you meant.

[v2]
Jan Kara has pointed out that if we add the
sb_start/end_pagefault pair in the new pfn_mkwrite we
are then fixing another bug where: A user could start
writing to the page while filesystem is frozen.

[v1]
The main problem is that current mm/memory.c will no call us with page_mkwrite
if we do not have an actual page mapping, which is what DAX uses.
The solution presented here introduces a new pfn_mkwrite to solve this problem.
Please see patch-2 for details.

I've been running with this patch for 4 month both HW and VMs with no apparent
danger, but see patch-1 I played it safe.

I am also posting an xfstest 080 that demonstrate this problem, I believe
that also some git operations (can't remember which) suffer from this problem.
Actually Eryu Guan found that this test fails on some other FS as well.

List of patches:
  [PATCH 1/3] mm: New pfn_mkwrite same as page_mkwrite for VM_PFNMAP
  [PATCH 2/3] dax: use pfn_mkwrite to update c/mtime + freeze
  [PATCH 3/3] RFC: dax: dax_prepare_freeze

  [PATCH v4] xfstest: generic/080 test that mmap-write updates c/mtime

Please I need that some mm person review the first patch?

Andrew hi
I believe this needs to eventually go through your tree. Please pick it
up when you feel it is ready. I believe the first 2 are ready and fix real
bugs.

Matthew hi
I would love to have your ACK on these patches?

Thanks
Boaz

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2015-04-12  7:49 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07  8:33 [PATCH 0/3 v5] dax: some dax fixes and cleanups Boaz Harrosh
2015-04-07  8:33 ` Boaz Harrosh
2015-04-07  8:40 ` [PATCH 1/3] mm(v4.1): New pfn_mkwrite same as page_mkwrite for VM_PFNMAP Boaz Harrosh
2015-04-07  8:51   ` Boaz Harrosh
2015-04-07  8:51     ` Boaz Harrosh
2015-04-07  9:03   ` Kirill A. Shutemov
2015-04-07  9:22     ` Boaz Harrosh
2015-04-07 12:57   ` [PATCH 1/3 v6] " Boaz Harrosh
2015-04-07 12:57     ` Boaz Harrosh
2015-04-07 13:17     ` Kirill A. Shutemov
2015-04-07 13:26       ` Kirill A. Shutemov
2015-04-07 13:37         ` Boaz Harrosh
2015-04-07 13:37           ` Boaz Harrosh
2015-04-07 13:47           ` Kirill A. Shutemov
2015-04-07 14:09             ` Boaz Harrosh
2015-04-07 14:09               ` Boaz Harrosh
2015-04-07 14:06   ` [PATCH 1/3 v7] " Boaz Harrosh
2015-04-07 14:06     ` Boaz Harrosh
2015-04-07 14:12     ` Kirill A. Shutemov
2015-04-07  8:43 ` [PATCH 2/3] dax: use pfn_mkwrite to update c/mtime + freeze protection Boaz Harrosh
2015-04-07  8:43   ` Boaz Harrosh
2015-04-07 16:28   ` Jan Kara
2015-04-07 16:28     ` Jan Kara
2015-04-07  8:45 ` [PATCH 3/3] dax: Unify ext2/4_{dax,}_file_operations Boaz Harrosh
2015-04-07  8:45   ` Boaz Harrosh
2015-04-07 16:26   ` Jan Kara
2015-04-08 15:56 ` [PATCH 1/3 @stable] mm(v4.0): New pfn_mkwrite same as page_mkwrite for VM_PFNMAP Boaz Harrosh
2015-04-08 15:56   ` Boaz Harrosh
2015-04-08 16:00   ` Boaz Harrosh
2015-04-08 16:00     ` Boaz Harrosh
2015-04-08 20:26     ` Greg KH
2015-04-12  7:49       ` Boaz Harrosh
2015-04-12  7:49         ` Boaz Harrosh
  -- strict thread matches above, loose matches on Subject: below --
2015-03-23 12:47 [PATCH 0/3 v3] dax: Fix mmap-write not updating c/mtime Boaz Harrosh
2015-03-23 12:52 ` [PATCH 2/3] dax: use pfn_mkwrite to update c/mtime + freeze protection Boaz Harrosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.