From: Matthew Wilcox <willy@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-mm@kvack.org, Hugh Dickins <hughd@google.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>
Subject: Re: [PATCH] tmpfs: zero post-eof folio range on file extension
Date: Wed, 25 Jun 2025 20:21:03 +0100 [thread overview]
Message-ID: <aFxMHzBabpMt0Bno@casper.infradead.org> (raw)
In-Reply-To: <20250625184930.269727-1-bfoster@redhat.com>
On Wed, Jun 25, 2025 at 02:49:30PM -0400, Brian Foster wrote:
> Most traditional filesystems zero the post-eof portion of the eof
> folio at writeback time, or when the file size is extended by
> truncate or extending writes. This ensures that the previously
> post-eof range of the folio is zeroed before it is exposed to the
> file.
>
> tmpfs doesn't implement the writeback path the way a traditional
> filesystem does, so zeroing behavior won't be exactly the same.
> However, it can still perform explicit zeroing from the various
> operations that extend a file and expose a post-eof portion of the
> eof folio. The current lack of zeroing is observed via failure of
> fstests test generic/363 on tmpfs. This test injects post-eof mapped
> writes in certain situations to detect gaps in zeroing behavior.
>
> Add a new eof zeroing helper for file extending operations. Look up
> the current eof folio, and if one exists, zero the range about to be
> exposed. This allows generic/363 to pass on tmpfs.
This seems like what I did here?
https://lore.kernel.org/linux-fsdevel/20230202204428.3267832-4-willy@infradead.org/
Which fix should we prefer?
next prev parent reply other threads:[~2025-06-25 19:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 18:49 [PATCH] tmpfs: zero post-eof folio range on file extension Brian Foster
2025-06-25 19:21 ` Matthew Wilcox [this message]
2025-06-26 5:35 ` Hugh Dickins
2025-06-26 12:55 ` Brian Foster
2025-06-27 3:21 ` Baolin Wang
2025-06-27 11:54 ` Brian Foster
2025-07-09 7:57 ` Hugh Dickins
2025-07-10 6:47 ` Baolin Wang
2025-07-10 22:20 ` Hugh Dickins
2025-07-11 3:50 ` Baolin Wang
2025-07-11 7:50 ` Hugh Dickins
2025-07-11 8:42 ` Baolin Wang
2025-07-11 16:08 ` Brian Foster
2025-07-11 20:15 ` Brian Foster
2025-07-14 3:05 ` Baolin Wang
2025-07-14 14:38 ` Brian Foster
2025-07-10 12:36 ` Brian Foster
2025-07-10 23:02 ` Hugh Dickins
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=aFxMHzBabpMt0Bno@casper.infradead.org \
--to=willy@infradead.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bfoster@redhat.com \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
/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).