From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796491207; b=S7vyI8y/t+HTgtagxf4OX9U6A8sTJiiIRwMZsH+vACS5DRDUCM+m5qVdRf3PMhvnKgD8 LJX5houQLZEeLHoSG70IkyCyn26HgyDSevs5BrPe9ub2r6tAjhs3tBM5N9UvtEh3pVnW3 dtANkRwVCqhDHMVU9gnrpJ3yjxIn+ii0cGrr+ivPHia39NhSuoPP1X9iqkWST+JWFtopQ bh55Hk+L65y60KjVB7/3qjOqei9BQ9bJhHCbTeWphsrh9Mx26k9B0HUy0c4dEHxhSoj38 U9QeetShcdfEpbIu+QfAcHv03Yk3XBZaYMQxqyweFZbgwTuw2J6xZaRJcPtFKBxMPtA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796491207; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=8byhInFDE7UCBMmGhEAwwuKlHWvUDoby6+5hKXbpDic=; b=s0Rrzc2/eQex030CtQIVG3QBH0q8997OloRN1YpwgSPV+sBTZW+6WGm8vjWEz3vAe9gS 2t2SpjTCjQQwSPJn1+V17lBAr43FD3AhWmv6ipw1rzwSv5SOdrAuNTSzD6BbZ93k9Wyj4 F252CbvobyyKKmU02EIyZJk6I1eaLBh3bqqHyQng31dD8goYLy1ez8/5x49EyULVtkICz 4uF/eZEHZ/iI16mDSEqX3472nCx0POCr4f1dFjggOdM5xnmlo8gmi9Wj6F5jv7PWcyBgx B86SN9JL0afTeppECC5Ae7OUhVrDUACXlttsZFiDJDgR86WTSbuz381TwMclCRiri3Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=KtHNI1P0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE682606A31F for ; Sat, 5 Dec 2026 17:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=KtHNI1P0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52D1C1F0092B; Sat, 5 Dec 2026 17:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796491207; bh=8byhInFDE7UCBMmGhEAwwuKlHWvUDoby6+5hKXbpDic=; h=Date:To:From:In-Reply-To:References:Subject; b=KtHNI1P0HxCaMAaTxyf7KlIEdjm6NugFlQH48kJjAYS+8pdpt1mrG6ciLy+OPNhPV vm7Bo5180g+xTzlRGPyTNXMmDB8F1uI3Bqaf4G0SCyqxuBgfXiCWNoDF5TFuU5FHFY LKEcuBOy2pEgHaqqgRlBXWpCdsmpgiOJ20mrKp1A= Date: Sat, 05 Dec 2026 09:20:06 -0800 To: mm-commits@vger.kernel.org,mark@fasheh.com,joseph.qi@linux.alibaba.com, jlbec@evilplan.org,hch@lst.de,heming.zhao@suse.com,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261205143959.704982-6-joseph.qi@linux.alibaba.com> References: <20261205143959.704982-6-joseph.qi@linux.alibaba.com> Subject: + ocfs2-record-the-fsync-transaction-when-cow-makes-clusters-writable.patch added to mm-nonmm-unstable branch Message-Id: <20261205172007.52D1C1F0092B@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The patch titled Subject: ocfs2: record the fsync transaction when CoW makes clusters writable has been added to the -mm mm-nonmm-unstable branch. Its filename is ocfs2-record-the-fsync-transaction-when-cow-makes-clusters-writable.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/ocfs2-record-the-fsync-transaction-when-cow-makes-clusters-writable.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Heming Zhao Subject: ocfs2: record the fsync transaction when CoW makes clusters writable Date: Sat, 05 Dec 2026 22:39:54 +0800 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 before committing, at out_commit, so the error exits after the transaction started record it too: earlier loop iterations may already have dirtied extent tree buffers that ocfs2_commit_trans() will write. Link: https://patch.msgid.link/20261205143959.704982-6-joseph.qi@linux.alibaba.com Fixes: 2931cdcb4919 ("ocfs2: improve fsync efficiency and fix deadlock between aio_write and sync_file") Signed-off-by: Heming Zhao Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Co-developed-by: Joseph Qi Cc: Christoph Hellwig Cc: Mark Fasheh Cc: Joel Becker fs/ocfs2/refcounttree.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/ocfs2/refcounttree.c~ocfs2-record-the-fsync-transaction-when-cow-makes-clusters-writable +++ a/fs/ocfs2/refcounttree.c @@ -3360,6 +3360,8 @@ static int ocfs2_make_clusters_writable( } out_commit: + ocfs2_update_inode_fsync_trans(handle, context->inode, + context->get_clusters == ocfs2_di_get_clusters); ocfs2_commit_trans(osb, handle); out: _ Patches currently in -mm which might be from heming.zhao@suse.com are ocfs2-add-new-ocfs2_map_blocks-to-introduce-iomap-feature.patch ocfs2-switch-dio-read-path-from-buffer_head-to-iomap.patch ocfs2-add-ocfs2_get_clusters_uncached.patch ocfs2-refactor-ocfs2_lock_allocators-and-add-a-dio-variant.patch ocfs2-record-the-fsync-transaction-when-cow-makes-clusters-writable.patch ocfs2-rework-the-direct-write-context-for-multi-cluster-mappings.patch ocfs2-switch-dio-write-path-from-buffer_head-to-iomap.patch