From: Christoph Hellwig <hch@infradead.org>
To: Hongling Zeng <zenghongling@kylinos.cn>
Cc: cem@kernel.org, dchinner@redhat.com, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org, zhongling0719@126.com,
stable@vger.kernel.org
Subject: Re: [PATCH] xfs: fix fallback data device flush for realtime inodes
Date: Wed, 29 Jul 2026 01:34:00 -0700 [thread overview]
Message-ID: <amm6-JkURolQqXDo@infradead.org> (raw)
In-Reply-To: <20260729073918.64505-1-zenghongling@kylinos.cn>
On Wed, Jul 29, 2026 at 03:39:18PM +0800, Hongling Zeng wrote:
> xfs_file_fsync() has a fallback flush for the case where the log force
> was a no-op, for example fdatasync/O_DSYNC overwrites of already
> allocated file data with no metadata updates.
>
> The current fallback path is limited to non-realtime inodes and always
> flushes mp->m_ddev_targp. This misses realtime inodes whose data target
> is selected by the inode and may be mp->m_rtdev_targp.
No. The rt device is flushed before the called to xfs_fsync_flush_log,
as we need to ensure that the data is flushed from the cache before
the log commit. For the data device, the REQ_PREFLUSH case takes
care that. After xfs_fsync_flush_log we only need to take care of
the data device if the file is on the data device and the cache
wasn't flushed as part of the log commit.
next prev parent reply other threads:[~2026-07-29 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 7:39 [PATCH] xfs: fix fallback data device flush for realtime inodes Hongling Zeng
2026-07-29 8:34 ` Christoph Hellwig [this message]
2026-07-29 8:59 ` Hongling Zeng
2026-07-29 14:28 ` Christoph Hellwig
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=amm6-JkURolQqXDo@infradead.org \
--to=hch@infradead.org \
--cc=cem@kernel.org \
--cc=dchinner@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=zenghongling@kylinos.cn \
--cc=zhongling0719@126.com \
/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