From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.119 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796222124; b=BRVWrZoPFUN4AhQhPWNP+ZXUeNJ9GxGGvuZiIULxi0SQFBFbUCNNQ9IG9S9vUXDH2KPH TY/0wLxLVFTrxn5B+I9QnwldZGfUCVEfta2BCIoYaqh4hDkRhKhGHDRxXIj1ccRbxZm1q oXR9ASEDNuDAECBC0RuhPbf0Q12w2Xlu2sRKVNA+arl7v8Ja+TEk/8lRfUEZN+tEQT9Ir XjiK8amuhDkiVv/+NnuLDYZzvTomxzapo7wVnkHP6zMmaVk3m4IY7/aK0ChhVB7l0Np1n OFZmRTSRRnKLImaj93ASqw4cWyrWu19sBLlAoqV21VELlY2cKSmbgOHslThyFbSg0Rg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796222124; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc: Subject:Date:Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=phjPvTXVSb/l7ClZgXgh7XtD01bffbAhZ9O2GghLXmM=; b=ACjgfGWaydGcjCdYwt6VWrYEfYNkRe1NwI0QBNoEJRPFNfuNFJthO5lC3zyIIOysFqmm ZZLGhDMvtK7CcWqFFYoAQMcSjb/lqV8FC25lREjTvJTkZNFctv8txRKdhIEMSnVU/0BaV k3370vp1uxhuNJ0kDRV3dhKYEitRNdVm3FQS7xzL0AeMXVTMGgBsQBsfEcG+NR/7c9cv6 4aI746MvTf/JpO5eE37rEddHf8RZxFWJ28DahSljAAJgAz+eiTz51PpSDqls+h5q/HuV7 vBrsYh51jTJezfyA8FDibKlhtwoOP96lpteAUV0weIGrehKcLdzFc94s5rk3DTbYDdw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=hVAyl3Ce; arc=none smtp.remote-ip=115.124.30.119 Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A07BA606A680 for ; Wed, 2 Dec 2026 14:35:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A07BA606A680 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=hVAyl3Ce DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796222114; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=phjPvTXVSb/l7ClZgXgh7XtD01bffbAhZ9O2GghLXmM=; b=hVAyl3CevruWDcoAQkek5OmtiUwf/M+Y4OkfaF3oBODU+1vRWzWaUugmoCeZlBoJplYKB5AK7VlFHfzyhBruwVTM2Orq2sNxoem12ROy6Zgy+zX6kAgr4ifRlQ7P/QmY9uwG13Vb6e5xLwQXiPT53ME+jafOWvIOROtbWZl6gB4= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045144198;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0XGB8jwJ_1796222113; Received: from localhost(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0XGB8jwJ_1796222113 cluster:ay36) by smtp.aliyun-inc.com; Wed, 02 Dec 2026 22:35:14 +0800 From: Joseph Qi To: hch@lst.de, Heming Zhao Cc: Andrew Morton , Mark Fasheh , Joel Becker , ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org, Joseph Qi Subject: [RFC PATCH v15 05/10] ocfs2: record the fsync transaction when CoW makes clusters writable Date: Wed, 2 Dec 2026 22:35:02 +0800 Message-Id: <20261202143507.1754776-6-joseph.qi@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20261202143507.1754776-1-joseph.qi@linux.alibaba.com> References: <20261202143507.1754776-1-joseph.qi@linux.alibaba.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Heming Zhao ocfs2_make_clusters_writable() changes the extent tree to break a refcount sharing, but it does not record the transaction in the inode's datasync tid. A subsequent O_DSYNC or fsync that relies on i_datasync_tid can therefore consider the CoW already committed and skip waiting for it. Record it on the success path, like the other extent tree changes do. Fixes: 6f70fa519976 ("ocfs2: Add CoW support.") Co-developed-by: Joseph Qi Signed-off-by: Joseph Qi Signed-off-by: Heming Zhao --- fs/ocfs2/refcounttree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 4f13b5a6faa7d..2e2f3becb8da9 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -3360,6 +3360,7 @@ static int ocfs2_make_clusters_writable(struct super_block *sb, } out_commit: + ocfs2_update_inode_fsync_trans(handle, context->inode, 1); ocfs2_commit_trans(osb, handle); out: -- 2.39.3