Skip to content

mm,dax: Fix data corruption due to mmap inconsistency

Jan Kara linux-ext4 linux-fsdevel linux-mm linux-nvdimm nvdimm stable 3 versions – Applied

Status from this message: [merged] ext4-return-back-to-starting-transaction-in-ext4_dax_huge_fault.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 3 repliesApplied 4/4
  2. v34 patches 0 repliesSuperseded
  3. v24 patches 3 repliesSuperseded

Changes in v4 from the cover letter

* Rebased on top of current Linus' tree due to non-trivial conflicts with added tracepoint

Patches in v4 All 4 applied

#Subject and filesSizeRepliesApplied
1/4dax: prevent invalidation of mapped DAX entriesfs/dax.c include/linux/dax.h mm/truncate.c+3 -360 repliesApplied
2/4mm: Fix data corruption due to stale mmap readsfs/dax.c mm/truncate.c+12 -20 repliesApplied
3/4ext4: Return back to starting transaction in ext4_dax_huge_fault()fs/ext4/file.c+17 -40 repliesApplied
4/4dax: Fix data corruption when fault races with writefs/dax.c+16 -162 repliesApplied

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchRoss ZwislerJan Kara
1/4
2/4
3/4
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH 0/4 v4] mm,dax: Fix data corruption due to mmap inconsistency

Hello,

this series fixes data corruption that can happen for DAX mounts when page faults race with write(2) and as a result page tables get out of sync with block mappings in the filesystem and thus data seen through mmap is different from data seen through read(2).

The series passes testing with t_mmap_stale test program from Ross and also other mmap related tests on DAX filesystem.

Andrew, can you please merge these patches? Thanks!

Changes since v3:
* Rebased on top of current Linus' tree due to non-trivial conflicts with added tracepoint

Changes since v2:
* Added reviewed-by tag from Ross

Changes since v1:
* Improved performance of unmapping pages
* Changed fault locking to fix another write vs fault race

Honza

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>