linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ding Feng <dingf3ng@gmail.com>
To: Brian Foster <bfoster@redhat.com>
Cc: Hugh Dickins <hughd@google.com>,
	David Hildenbrand <david@kernel.org>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Ding Feng <dingf3ng@gmail.com>
Subject: Re: [PATCH v3 0/3] tmpfs: zero post-eof ranges on file extension
Date: Fri, 20 Nov 2026 13:13:19 +0800	[thread overview]
Message-ID: <20261120051319.44456-1-dingf3ng@gmail.com> (raw)
In-Reply-To: <20251121152246.1023918-1-bfoster@redhat.com>

Hi Brian,

I ran into this on tmpfs independently, and the series fixes it on
v7.4-rc3 (65e4fd942). Patch 1 needed a one-line context fix (the
i_private test in shmem_writeout() is now READ_ONCE(inode->i_private));
patches 2 and 3 applied with reduced context.

Test: a 100-byte file, 'A' written at offset 50, 'X' stored at offset
200 through a shared mapping, then the file extended, then bytes 200
and 50 read back (arm64, QEMU):

  extension                     unpatched    patched
  fallocate(0, 150, 100)        'X'          0
  fallocate(0, 1000, 100)       'X'          0
  ftruncate(fd, 250)            'X'          0
  pwrite 1 byte at 1099         'X'          0

Byte 50 reads 'A' in every case, and ext4 gives 0 on both kernels. I
did not test the swapout path (patch 2).

Tested-by: Ding Feng <dingf3ng@gmail.com>

Thanks,
Ding Feng


      parent reply	other threads:[~2026-11-20  5:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21 15:22 [PATCH v3 0/3] tmpfs: zero post-eof ranges on file extension Brian Foster
2025-11-21 15:22 ` [PATCH v3 1/3] tmpfs: factor out folio zeroing logic at writeout time Brian Foster
2025-11-21 15:22 ` [PATCH v3 2/3] tmpfs: zero post-eof folio ranges on swapout Brian Foster
2025-11-21 15:22 ` [PATCH v3 3/3] tmpfs: zero post-eof ranges on file extension Brian Foster
2025-11-25  2:20 ` [PATCH v3 0/3] " Baolin Wang
2026-11-20  5:13 ` Ding Feng [this message]

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=20261120051319.44456-1-dingf3ng@gmail.com \
    --to=dingf3ng@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bfoster@redhat.com \
    --cc=david@kernel.org \
    --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).