linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-fsdevel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, djwong@kernel.org, brauner@kernel.org,
	torvalds@linux-foundation.org, trondmy@hammerspace.com
Subject: [PATCHSET 0/5] dropbehind fixes and cleanups
Date: Tue, 27 May 2025 07:28:51 -0600	[thread overview]
Message-ID: <20250527133255.452431-1-axboe@kernel.dk> (raw)

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(-)

-- 
Jens Axboe


             reply	other threads:[~2025-05-27 13:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 13:28 Jens Axboe [this message]
2025-05-27 13:28 ` [PATCH 1/5] mm/filemap: gate dropbehind invalidate on folio !dirty && !writeback Jens Axboe
2025-05-28  8:12   ` Christoph Hellwig
2025-05-27 13:28 ` [PATCH 2/5] mm/filemap: use filemap_end_dropbehind() for read invalidation Jens Axboe
2025-05-28  8:13   ` Christoph Hellwig
2025-05-27 13:28 ` [PATCH 3/5] Revert "Disable FOP_DONTCACHE for now due to bugs" Jens Axboe
2025-05-28  8:14   ` Christoph Hellwig
2025-05-27 13:28 ` [PATCH 4/5] mm/filemap: unify read/write dropbehind naming Jens Axboe
2025-05-28  8:14   ` Christoph Hellwig
2025-05-27 13:28 ` [PATCH 5/5] mm/filemap: unify dropbehind flag testing and clearing Jens Axboe
2025-05-28  8:15   ` Christoph Hellwig
2025-05-27 19:10 ` [PATCHSET 0/5] dropbehind fixes and cleanups Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250527133255.452431-1-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=trondmy@hammerspace.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).