All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
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
Subject: + ocfs2-record-the-fsync-transaction-when-cow-makes-clusters-writable.patch added to mm-nonmm-unstable branch
Date: Sat, 05 Dec 2026 09:20:06 -0800	[thread overview]
Message-ID: <20261205172007.52D1C1F0092B@smtp.kernel.org> (raw)
In-Reply-To: <20261205143959.704982-6-joseph.qi@linux.alibaba.com>


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 <heming.zhao@suse.com>
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 <heming.zhao@suse.com>
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Co-developed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>

 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


  reply	other threads:[~2026-12-05 17:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 14:39 [PATCH v18 00/10] migrate ocfs2 DIO from buffer_head to iomap Joseph Qi
2026-12-05 14:39 ` [PATCH v18 01/10] ocfs2: Add new ocfs2_map_blocks() to introduce iomap feature Joseph Qi
2026-12-05 17:19   ` + ocfs2-add-new-ocfs2_map_blocks-to-introduce-iomap-feature.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 02/10] ocfs2: switch DIO read path from buffer_head to iomap Joseph Qi
2026-12-05 17:19   ` + ocfs2-switch-dio-read-path-from-buffer_head-to-iomap.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 03/10] ocfs2: add ocfs2_get_clusters_uncached() Joseph Qi
2026-12-05 17:20   ` + ocfs2-add-ocfs2_get_clusters_uncached.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 04/10] ocfs2: refactor ocfs2_lock_allocators() and add a dio variant Joseph Qi
2026-12-05 17:20   ` + ocfs2-refactor-ocfs2_lock_allocators-and-add-a-dio-variant.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 05/10] ocfs2: record the fsync transaction when CoW makes clusters writable Joseph Qi
2026-12-05 17:20   ` Andrew Morton [this message]
2026-12-05 14:39 ` [PATCH v18 06/10] ocfs2: rework the direct write context for multi-cluster mappings Joseph Qi
2026-12-05 17:20   ` + ocfs2-rework-the-direct-write-context-for-multi-cluster-mappings.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 07/10] ocfs2: switch dio write path from buffer_head to iomap Joseph Qi
2026-12-05 17:20   ` + ocfs2-switch-dio-write-path-from-buffer_head-to-iomap.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 08/10] ocfs2: keep sub-page overwrites of written blocks on direct I/O Joseph Qi
2026-12-05 17:20   ` + ocfs2-keep-sub-page-overwrites-of-written-blocks-on-direct-i-o.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 09/10] ocfs2: write the dio zeroed head/tail buffers out before completion Joseph Qi
2026-12-05 17:20   ` + ocfs2-write-the-dio-zeroed-head-tail-buffers-out-before-completion.patch added to mm-nonmm-unstable branch Andrew Morton
2026-12-05 14:39 ` [PATCH v18 10/10] ocfs2: make buffered writes wait for in-flight direct writes Joseph Qi
2026-12-05 17:20   ` + ocfs2-make-buffered-writes-wait-for-in-flight-direct-writes.patch added to mm-nonmm-unstable branch Andrew Morton

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=20261205172007.52D1C1F0092B@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=heming.zhao@suse.com \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=mark@fasheh.com \
    --cc=mm-commits@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.