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=1795901022; b=YzKtJ5vqFZiZ8l8P126NEvQAb5tbv2T0+zeiLV+WzJ2HtK5IY9asdXvOaxUjDzQPpXAv 6m2pRM3q49ZohKlrIhwUcQlmG7ZevnbTx3fXtXlOUtFIoz0vvaD8Fl46dRIGm0/NMACbD PPGP4XSNY+LKj9mC35+RVh1Z0TfLKucKpLGwxlPeNkQOFnLG7R3n9rrzsuCBPS+1bcwGr /m/e6XgGAZYKf2c+CZQwUJngkTKioqExqVqOYnokFxsxagDJm9jCjidFE2p3QD6q3LQGM zN07tUxpIc6AaIi3mzOuYXyXDHr98qEEavZJGOeZc2OL9mpKTCgGLX2GBEjVjDEKHVg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795901022; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=KTcbIXeGVObgIrtJXVYLMkkgEbKOVI7dVGl/23BvTG8=; b=mpeRT+NHNSIp4Vfd1WeZp8lWVUXWu82CvnKRHq8hR1TmzRVqTu5Rj59mBJdQDfMDgs+R FjSqE5zZkk5h83+4gJu/3WiQhOdNMz+Mu3/OgkNZlkSZIKLdTmPwxNPMTwY3nM3WFP1Cl Szx6IFDk5LI1SDYGj9PxOt6p2OgX/4bfPsYxO25NTbZ4AGNEjjS2l6XrsHsn0UayHmush OdFokhyQIw4kLzKIhQEG0IEvFe8RMZSv4lXJlyVnduViThlnUvIR1tXk/z26P7HKlPPq8 BtiHfZDFja4vcgfylFRguOk/WHd83KrMtu128k4UrMJ5fx1NFtbsVNAErt2rikVDH3g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OgDngPBB; 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 4A21F606A31C for ; Sat, 28 Nov 2026 21:23:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OgDngPBB Received: by smtp.kernel.org (Postfix) with ESMTPSA id C61BE1F00897; Sat, 28 Nov 2026 21:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795901021; bh=KTcbIXeGVObgIrtJXVYLMkkgEbKOVI7dVGl/23BvTG8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=OgDngPBBtW5+mt+KpoXrnqHtYd+qSNbMBen7lwakdkfEsV+P6CyRifrCBF4c68vUv hwVbgiOqnOJhBGajPgM7Vr4nIag5RNWWMQbln+7Wm1eKzq/dbSDqo9+5+3H1scRmKv 8XqPU0OsPLJWqs1ZyWorGg0aBxeyfuLNXtg5GBtfGyKEwP6SFhCU3azjj1zRutNE2Y X1XmexQHV+2k1+VWFkbXlQO/FnaqYssRkxlnkxM76J68nW02JOEMabKA6hb/xeQmJv qo45BjIqbuQVKxCC0fh5h/1TBOpiFz+ZMspUUo0FGNxcrZlXudaTzmALb6JetqCNvJ WmlYEkpZJhEiw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] ext2: report failed synchronous inode writes during truncate Reply-To: sashiko-reviews@lists.linux.dev To: "Wesley Atwell" Cc: linux-ext4@vger.kernel.org, tytso@mit.edu In-Reply-To: References: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Nov 2026 21:23:41 +0000 X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] ext2: missing Fixes trailer for ext2_setsize() sync error propagation fix -- commit 65c13ff61e7134c48b27bdd36d3a80ac61957d49 Author: Wesley Atwell > ext2: report failed synchronous inode writes during truncate > > For a file marked synchronous with chattr +S, ext2_setsize() writes the > changed inode metadata before returning from truncate. It currently > ignores the result of sync_inode_metadata(). If the inode-table write > fails, a caller can receive success even though the new size was not > persisted. > > On an unmodified kernel from the ext2 for_next tree, a QEMU guest used > GNU truncate to clear an 8 KiB ext2 file marked +S. A targeted write > error on that file's inode-table block was reported by ext2, but > ftruncate() returned 0. After an abrupt guest stop and a fault-free > read-only mount, the original file and its hash remained. Two separate > fault runs reproduced this result; the healthy control truncated the > file durably. > > Return the synchronous metadata-write result through ext2_setsize() and > its existing ext2_setattr() caller. With the same fault, GNU truncate > now receives EIO in two runs; the healthy control still succeeds. This > reports failed persistence to userspace. It does not roll back changes > already made in memory or repair the filesystem after a device error. > > OpenAI Codex identified the ignored write result, drafted the fix and > changelog, and prepared the QEMU truncate tests. Both fault runs on the > changed kernel returned EIO. The healthy controls persisted the new > file size on both kernels. > > Signed-off-by: Wesley Atwell [Severity: Low] This fixes a bug introduced when ext2_truncate() was converted to ext2_setsize() without propagating the synchronous inode write result. Should this include: Fixes: 737f2e93b972 ("ext2: convert to use the new truncate convention.") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/kernel-5e344791e4b0= 4a67-v1.atwellwea@gmail.com?part=3D1