From nobody Tue Dec 2 01:28:18 2025 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03AE02F2918 for ; Fri, 21 Nov 2025 11:57:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763726222; cv=none; b=SGSX4bnnA2YoAdcC6CTHOtxRLUfvm6ecvwyck8jTlkNfLWJ/5cpBaKx7H0aI/UTz1gDFuibEkObFW/I5Y/A3VSGioNUbBemBFunSrSdphmvbPtjvZSGVrm/m1B2sBUiZkefrhPwhaD53n6TuaWj+v5wAlaxn0snKYttX2Lu2TaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763726222; c=relaxed/simple; bh=R8GRcttGF1T3d6+Cl/AroewdMSebGIHuofVMGMJsXlY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ep6yGUDKh+7r9oV2xu7cpRyYKO4S+OU0ImY3jB98L31kYBowXp4K/xj2w6A0C6gPZzXZb3pEHov484P3CC4Z+Lzcw5XXjikMxsuXVGBKnEivMI2VSXYf4kPy35HB8wMLVWuuD9+FNoqlIedzEem1zERTNyOuYM0A/cjLavTvlzc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J4lE3iSx; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J4lE3iSx" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-297d4a56f97so28057255ad.1 for ; Fri, 21 Nov 2025 03:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763726220; x=1764331020; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0kaM0a2BYntxbf1z2+KtSo06Ztxj21kqZKO+ZWV34Dc=; b=J4lE3iSxsTghWQee2EMfn8RCwVOeN2pAI6tMo1B49lxTwRU9+BVIqIIXgHxqsZfkLj qAh6Lm2OCFsjl7rl/aBqkQMxveVRfWQNGjo+mU+Qn+jCOwhhyAIWY653nHGF2Cr2XHj8 nu1s3H55k6Op+hLXNioMgqSz90nYKXW5ARPzbVqV3mszxWCRS82Ez+YDSmWZovYwKnsT d4HpBkZGR2aYeynVQxH1M13pVH0rhHl8k4EqNK97nDipm+zQnVLyhgVoSqAFub7j4dXU 97Y2O7c1xAqK6DQhHZ/I1Bks6WtmiouuOOoulRi9pRGNEuBByjl4xCr4veSVVDCXuZXG MuOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763726220; x=1764331020; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0kaM0a2BYntxbf1z2+KtSo06Ztxj21kqZKO+ZWV34Dc=; b=gCiP6si8fLPMSftfKzTqwBQPhNjM66+6xANKLcqlabg6+TlM259tzhpnA8lTT601/o cOYo+x8YR7MgQjbhdR6XQGF6B8Oe/DIc13Prqlgke79eLgK5otb7M6pZf92NE4QEaB86 rpXUQezRlIae7oqFhSDCBjTBn+7QapRN7bOpPKBM0IbfxfpojoRT6yEO59TQhN7tdfIQ NL3ryqNLVGn0i1e9Rs/7ZBreGxAy6kSVTd8wJnSdT5Obqf9vbmSjgqzeq5HfAapwKzYY 0rdry/rcrcBxUdxDjSmpqllt8UQXayJxxpdCQtDL0mIWF7wZqpF8V+mPJ58uj2zm3/95 gnsg== X-Forwarded-Encrypted: i=1; AJvYcCXCrmsalLv+eVbrdBJ/fo/VVOkzB8VDl2D7ncnCIq3hoCHN8j/R3uLnqQc+AVykGOdLqwvia6jCd2nkW0E=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+fRj8pVntJXv2Y0lc9S1NeRJF1v0xgKeyAXMF4XavMkuAx911 Ktf5oCrnr99FBDpGolpULsit9EKd5abaWw8+5aM65a5SNaKHKTV6Aq6e X-Gm-Gg: ASbGnct/BiS4HrAwBkT7lcogeEX1CgTxhWngH0G8m/AX5H07MFoZdjXfobEgYjwCsoY dAsb+wf7zdbB5RcyVFpefLngsXyHqzDG7/di/35eW2bgo36WTXKJR0eEfO5aSV7EBRN3W+a3SVi 4B7ZkjG6BmSTx4fZYXHz7MQW7Ce0lMGFLiWHIX80u6D96U+ARm9d5xi/JNVCfOTG6aEoWpEGyrm SJ2yCDemyiaJyWWRE7GOqjAj2WGRJhTfy/Xggho20k1n//RUbxSR1TBP+qpkO9uIxRZWGMAvrhx jsetjdWVgD9j1ensc79FL4Zy61PxX4PleqdWbcTyx0Mft1qLgEw7uzl1Qj0S40JUMDZZeLmDs6n CcqvAWN0WyqB0WBb7lXKfnfEcpAzlz4ALOnftL1To1g4FGzolUoCw7HwxPj2UAU5A3WFDc76K7a ImNiJydAlg1Ex9XvCpyDiCNYSJjOqXyEM0Bw== X-Google-Smtp-Source: AGHT+IEQ5TKmJNvFOI6V93bWmKlvdZYoBEucDc7MxzGgWIqiOr4R2NffVPtJak5CjKQIcp0gLB9X8w== X-Received: by 2002:a05:7022:f683:b0:11b:c1fb:896 with SMTP id a92af1059eb24-11c9d70a12bmr945319c88.4.1763726220190; Fri, 21 Nov 2025 03:57:00 -0800 (PST) Received: from VM-16-24-fedora.. ([43.153.32.141]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11c93db4a23sm24119158c88.2.2025.11.21.03.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Nov 2025 03:56:59 -0800 (PST) From: alexjlzheng@gmail.com X-Google-Original-From: alexjlzheng@tencent.com To: cem@kernel.org Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Jinliang Zheng Subject: [PATCH] xfs: fix confused tracepoints in xfs_reflink_end_atomic_cow() Date: Fri, 21 Nov 2025 19:56:56 +0800 Message-ID: <20251121115656.8796-1-alexjlzheng@tencent.com> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jinliang Zheng 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. Signed-off-by: Jinliang Zheng Reviewed-by: Christoph Hellwig Reviewed-by: John Garry --- fs/xfs/xfs_reflink.c | 4 ++-- fs/xfs/xfs_trace.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 3f177b4ec131..47f532fd46e0 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -1003,7 +1003,7 @@ xfs_reflink_end_atomic_cow( struct xfs_trans *tp; unsigned int resblks; =20 - trace_xfs_reflink_end_cow(ip, offset, count); + trace_xfs_reflink_end_atomic_cow(ip, offset, count); =20 offset_fsb =3D XFS_B_TO_FSBT(mp, offset); end_fsb =3D XFS_B_TO_FSB(mp, offset + count); @@ -1028,7 +1028,7 @@ xfs_reflink_end_atomic_cow( end_fsb); } if (error) { - trace_xfs_reflink_end_cow_error(ip, error, _RET_IP_); + trace_xfs_reflink_end_atomic_cow_error(ip, error, _RET_IP_); goto out_cancel; } error =3D xfs_trans_commit(tp); diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h index 79b8641880ab..29eefacb8226 100644 --- a/fs/xfs/xfs_trace.h +++ b/fs/xfs/xfs_trace.h @@ -4186,12 +4186,14 @@ DEFINE_INODE_IREC_EVENT(xfs_reflink_convert_cow); =20 DEFINE_SIMPLE_IO_EVENT(xfs_reflink_cancel_cow_range); DEFINE_SIMPLE_IO_EVENT(xfs_reflink_end_cow); +DEFINE_SIMPLE_IO_EVENT(xfs_reflink_end_atomic_cow); DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap_from); DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap_to); DEFINE_INODE_IREC_EVENT(xfs_reflink_cow_remap_skip); =20 DEFINE_INODE_ERROR_EVENT(xfs_reflink_cancel_cow_range_error); DEFINE_INODE_ERROR_EVENT(xfs_reflink_end_cow_error); +DEFINE_INODE_ERROR_EVENT(xfs_reflink_end_atomic_cow_error); =20 =20 DEFINE_INODE_IREC_EVENT(xfs_reflink_cancel_cow); --=20 2.49.0