From: Carlos Maiolino <cem@kernel.org>
To: linux-xfs@vger.kernel.org, Lin Jiapeng <ljp1205831794@gmail.com>
Cc: stable@vger.kernel.org, djwong@kernel.org, hch@lst.de,
jiapenglin@tencent.com
Subject: Re: [PATCH v3] xfs: fix exchange-range reflink flag clearing issue with INO1_WRITTEN
Date: Thu, 03 Sep 2026 08:05:59 +0200 [thread overview]
Message-ID: <178841555975.1198521.11635969278161610368.b4-ty@kernel.org> (raw)
In-Reply-To: <20260728071921.81156-1-jiapenglin@tencent.com>
On Tue, 28 Jul 2026 15:19:10 +0800, Lin Jiapeng wrote:
> When exchanging two full-file ranges, xmi_can_exchange_reflink_flags()
> can move the reflink inode flag from the file that currently has it to
> the other file, as long as exactly one side is marked. This assumes
> that the file contents, and therefore all shared extents, are exchanged.
>
> That assumption is not true when XFS_EXCHMAPS_INO1_WRITTEN is set.
> xfs_exchmaps_can_skip_mapping() can skip hole and unwritten mappings
> from file1, so an exchange can complete without moving every mapping
> that the earlier flag-swap decision accounted for. In that case the
> post-operation cleanup can clear the reflink flag from an inode that
> still owns shared written extents. Later writes then take the
> non-reflink write path and may update blocks that should still have
> been protected by CoW, which shows up as data corruption between
> reflink-related files.
>
> [...]
Applied to for-next, thanks!
[1/1] xfs: fix exchange-range reflink flag clearing issue with INO1_WRITTEN
commit: f3772e189ee8e37860c2bb365f6ac3517db937e9
Best regards,
--
Carlos Maiolino <cem@kernel.org>
prev parent reply other threads:[~2026-09-03 6:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 7:19 [PATCH v3] xfs: fix exchange-range reflink flag clearing issue with INO1_WRITTEN Lin Jiapeng
2026-08-03 13:22 ` Carlos Maiolino
2026-08-31 8:03 ` Carlos Maiolino
2026-09-03 6:05 ` Carlos Maiolino [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=178841555975.1198521.11635969278161610368.b4-ty@kernel.org \
--to=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=jiapenglin@tencent.com \
--cc=linux-xfs@vger.kernel.org \
--cc=ljp1205831794@gmail.com \
--cc=stable@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