public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
	Brian Foster <bfoster@redhat.com>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: redirty eof folio on truncate to avoid filemap flush
Date: Wed, 2 Nov 2022 01:15:55 -0700	[thread overview]
Message-ID: <Y2InOzkYfW/4aKwt@infradead.org> (raw)
In-Reply-To: <20221029220131.GF3600936@dread.disaster.area>

On Sun, Oct 30, 2022 at 09:01:31AM +1100, Dave Chinner wrote:
> Right, think of iomap_truncate_page() as having exactly the same
> responsibilites as block_truncate_page() has for filesystems using
> bufferheads. i.e. both functions need to ensure the disk contents
> are correctly zeroed such that the caller can safely call
> truncate_setsize() afterwards resulting in both the on-disk state
> and in-memory state remaining coherent.

XFS always had these kinds of hacks even when it was using
block_truncate_page.  That being said, I fully agree that handling
it in iomap is the absolutely right thing to do and we should have
done it earlier.

  reply	other threads:[~2022-11-02  8:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 13:04 [PATCH RFC 0/2] xfs: optimize truncate cache flushing Brian Foster
2022-10-28 13:04 ` [PATCH RFC 1/2] xfs: lift truncate iomap zeroing into a new helper Brian Foster
2022-10-28 13:04 ` [PATCH RFC 2/2] xfs: optimize eof page flush for iomap zeroing on truncate Brian Foster
2022-10-28 13:11 ` [PATCH] xfs: redirty eof folio on truncate to avoid filemap flush Brian Foster
2022-10-28 18:26   ` Brian Foster
2022-10-28 21:30     ` Dave Chinner
2022-10-28 23:49       ` Darrick J. Wong
2022-10-29 22:01         ` Dave Chinner
2022-11-02  8:15           ` Christoph Hellwig [this message]
2022-11-03 14:53       ` Brian Foster
2022-11-03 22:25         ` Dave Chinner
2022-11-04 18:22           ` Brian Foster
2022-11-02  8:25     ` Christoph Hellwig
2022-10-28 21:35   ` kernel test robot

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=Y2InOzkYfW/4aKwt@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.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