From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E8B4126C17 for ; Mon, 19 Jan 2026 03:00:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768791628; cv=none; b=W0RjzLiBwp3vh4xT44RYayBnpA4RP/5jP12NzZK26PYV87HiqA1wttqVWacR0EQFuwb3ibUtYElw5hVV2LCpu0ocrmj43teqhe9jAhxtElqJzqo25DptBaC5yb9vV4fqjBvSXZ4BnqSb8SJscNAQwGwyl6O+H8Jkm3T2eMAn1JU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768791628; c=relaxed/simple; bh=kYFf20rT6f17wiGUNWsZrabyAYU/Ivq5nGmdFnw2Lk0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TsBGgp4sHwwHjYLjlRgerPhfhMDzzd2MjBq2+hmiOyVHXFiy1ohrebJKmTEBxgl8Lx81D/OQZYG1sT9wDw77bVG7RdnMgzY4EtypUqQRCcA21LT0UeEnlfnnvC+fOldsLSyxGU+HyLrLk56ALYI+Tb5WF6YdSdg3st1lmiIl/Z0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b=ZflvbTIx; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="ZflvbTIx" Received: from macsyma.thunk.org ([172.56.176.29]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 60J2xZ5v002519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 18 Jan 2026 21:59:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1768791581; bh=j/gdzEuIvBWKdRaHU/LTvK59F4Xl7xCNw0dR66Gm4+E=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=ZflvbTIxZnO9PvQ7QZixbHNdTSxtLqqOyuBzFXL7f+CjdEy67DSC0SdL6SSUbKEmP jykbT2AE8rKM279F9RqPkKm73GBA1e9VU42MGyxuGl+hCFfc5xjzVmnASSrg6v4upv /fXv6bN135K/fZpthj2B5vHsjN9OxTxmURWm9UIOjy4EnYTtlWhjB6B6RLAYqQbxVe dvXzJNdPWZae3gO8aRLbki0EUzaZ06EHag31EuQg/Zq3ZBA5t2LNwF7FledpSfFmPc pgiEhypVoUqq6SYoFH5ocvZlNEboUj3hbGXU/H+vspBq9KOnfiXwUtm8OkMDRrydAm HKMjfX5LZnfZg== Received: by macsyma.thunk.org (Postfix, from userid 15806) id D29CC553241D; Sun, 18 Jan 2026 16:58:57 -1000 (HST) Date: Sun, 18 Jan 2026 16:58:57 -1000 From: "Theodore Tso" To: Li Chen Cc: Andreas Dilger , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [RFC 5/5] ext4: mark group extend fast-commit ineligible Message-ID: <20260119025857.GC19954@macsyma.local> References: <20251211115146.897420-1-me@linux.beauty> <20251211115146.897420-6-me@linux.beauty> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251211115146.897420-6-me@linux.beauty> On Thu, Dec 11, 2025 at 07:51:42PM +0800, Li Chen wrote: > Fast commits only log operations that have dedicated replay support. > EXT4_IOC_GROUP_EXTEND grows the filesystem to the end of the last > block group and updates the same on-disk metadata without going > through the fast commit tracking paths. > In practice these operations are rare and usually followed by further > updates, but mixing them into a fast commit makes the overall > semantics harder to reason about and risks replay gaps if new call > sites appear. > > Teach ext4 to mark the filesystem fast-commit ineligible when > EXT4_IOC_GROUP_EXTEND grows the filesystem. > This forces those transactions to fall back to a full commit, > ensuring that the group extension changes are captured by the normal > journal rather than partially encoded in fast commit TLVs. > This change should not affect common workloads but makes online > resize via GROUP_EXTEND safer and easier to reason about under fast > commit. > > Testing: > 1. prepare: > dd if=/dev/zero of=/root/fc_resize.img bs=1M count=0 seek=256 > mkfs.ext4 -O fast_commit -F /root/fc_resize.img > mkdir -p /mnt/fc_resize && mount -t ext4 -o loop /root/fc_resize.img /mnt/fc_resize > 2. Extended the filesystem to the end of the last block group using a > helper that calls EXT4_IOC_GROUP_EXTEND on the mounted filesystem > and checked fc_info: > ./group_extend_helper /mnt/fc_resize > cat /proc/fs/ext4/loop0/fc_info > shows the "Resize" ineligible reason increased. > 3. Fsynced a file on the resized filesystem and confirmed that the fast > commit ineligible counter incremented for the resize transaction: > touch /mnt/fc_resize/file > /root/fsync_file /mnt/fc_resize/file > sync > cat /proc/fs/ext4/loop0/fc_info > > Signed-off-by: Li Chen I'm curious what version of the kernel you were testing against? I needed to mnake the final fix up to allow the patch to compile: diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 9354083222b1..ce1f738dff93 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -321,7 +321,8 @@ static int mext_move_extent(struct mext_data *mext, u64 *m_len) ret = PTR_ERR(handle); goto out; } - ext4_fc_mark_ineligible(sb, EXT4_FC_REASON_MOVE_EXT, handle); + ext4_fc_mark_ineligible(orig_inode->i_sb, EXT4_FC_REASON_MOVE_EXT, + handle); ret = mext_move_begin(mext, folio, &move_type); if (ret) - Ted