Skip to content

dropbehind fixes and cleanups

Jens Axboe linux-fsdevel stable 1 version Applied

Status from this message: Applied to the vfs.fixes branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5mm/filemap: gate dropbehind invalidate on folio !dirty && !writebackmm/filemap.c+11 -21 reply
2/5mm/filemap: use filemap_end_dropbehind() for read invalidationmm/filemap.c+3 -41 reply
3/5Revert "Disable FOP_DONTCACHE for now due to bugs"include/linux/fs.h+1 -11 reply
4/5mm/filemap: unify read/write dropbehind namingmm/filemap.c+2 -21 reply
5/5mm/filemap: unify dropbehind flag testing and clearingmm/filemap.c+11 -101 reply

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/5R-b
2/5R-b
3/5
4/5R-b
5/5R-b

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

Read the v1 thread

Cover letter [PATCHSET 0/5] dropbehind fixes and cleanups

Hi,

As per the thread here:

https://lore.kernel.org/linux-fsdevel/20250525083209.GS2023217@ZenIV/

there was an issue with the dropbehind support, and hence it got reverted (effectively) for the 6.15 kernel release. The problem stems from the fact that the folio can get redirtied and/or scheduled for writeback after the initial dropbehind test, and before we have it locked again for invalidation.

Patches 1+2 add a generic helper that both the read and write side can use, and which checks for !dirty && !writeback before going ahead with the invalidation. Patch 3 reverts the FOP_DONTCACHE disable, and patches 4 and 5 do a bit of cleanup work to further unify how the read and write side handling works.

This can reasonably be considered a 2 part series, as 1-3 fix the issue and could go to stable, while 4-5 just cleanup the code.

 include/linux/fs.h |  2 +-
 mm/filemap.c       | 39 ++++++++++++++++++++++++---------------
 2 files changed, 25 insertions(+), 16 deletions(-)
Signature · 1 line
Jens Axboe