Re: [PATCH] xfs: fix confused tracepoints in xfs_reflink_end_atomic_cow()
From: John Garry
Date: Mon Nov 24 2025 - 05:58:14 EST
On 24/11/2025 09:34, Christoph Hellwig wrote:
On Fri, Nov 21, 2025 at 07:56:56PM +0800, alexjlzheng@xxxxxxxxx wrote:
From: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>
The commit b1e09178b73a ("xfs: commit CoW-based atomic writes atomically")
introduced xfs_reflink_end_atomic_cow() for atomic CoW-based writes, but
it used the same tracepoint as xfs_reflink_end_cow(), making trace logs
ambiguous.
This patch adds two new tracepoints trace_xfs_reflink_end_atomic_cow() and
trace_xfs_reflink_end_atomic_cow_error() to distinguish them.
Confused sounds a bit strong,
Yeah, maybe "ambiguous" could be a better word.
FWIW,
Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>
but otherwise this looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Semi-related: back when this code was added I asked why we're not
using the transaction / defer ops chaining even for normale reflink
completions, as it should be just as efficient and that way we have
less code to maintain and less diverging code paths. Or am I missing
something?
Commit d6f215f35963 might be able to explain that.