From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f13.google.com (mail-wm2-f13.google.com [74.125.225.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B26724718CA for ; Mon, 28 Sep 2026 08:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790585303; cv=none; b=jYU6UzdUIl7qeY+U8M35QFoHyTx3OUFjqt+/2POBD1BcjlC2E4XJaKCS0Kjh15VgNOgO7Fe/oB0ZKEpqP237dBxSOeA/FnyagN6ZpEVd6EiOIVzKC4+zwfw+hUCtJJ63TfXNfkXW7NcnDMiTU2Y2H1wLc5NmGtcGqEbnmhMBEfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790585303; c=relaxed/simple; bh=nGNK4CJ7IAGxiLKQK5N1I+NN+hh0tDC50qXrF7zVWV0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KtwcyWF/0uaf7EJYWc3MNAdbhANLUfb3+c4YZAiRhApLZ3DO+Au1/ixhj8m2ncLHUT+Lc2SVgylIdGfGNy4LU9eTAMWK2+/g2KCH7MidiwqHgqfxjyPb0cwIDzP6KraswQhm3AcS90YcZ7YrJFHNA6FrNmSIZnW++Hw43krsw/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hJJpx8b+; arc=none smtp.client-ip=74.125.225.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hJJpx8b+" Received: by mail-wm2-f13.google.com with SMTP id 5b1f17b1804b1-49e6c0fce17so13863195e9.1 for ; Mon, 28 Sep 2026 01:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790585300; x=1791190100; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=DlTyxrC5JLY4QSgeol6426LcGC8kkaxi4wrrxLeCtIs=; b=hJJpx8b+vD0TBgD70aw8kyrK35e9qxFjpsoSa7cSUq9slEeIEJDqY76u6bCmf7cCa6 m3mZvs0nrJ0U2n+Xwmpl/4/x51CWtvg5d3GGJONzOqErG7sgTQegRZ5NzCGi2rm+15v8 P7Yh4lEmPzI/aj1jCHFRDOXx4AbnL3UnimiEkhItQ/t7SMxTPT9MYwb6GPkyN2/YIibO S59G9QM4x0bFDBK/o4b4CWoWl0hNdNiAlxNOU+CuG8+7WA71rdVdT3Q1s15Q0HrFGhvT 0ZSqWVnjER0SZMvv+GxxXRfGPS2xl0By6375Lrk8lpkUzXXDQCM9MVKxIx/Ko0wZHP5N PkWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790585300; x=1791190100; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=DlTyxrC5JLY4QSgeol6426LcGC8kkaxi4wrrxLeCtIs=; b=Zc2bZ3J6muK0iqApeWiev+hYU2Kl8ZfenDma7mOm4ZnLCdItec7gL3kbWkVGPdEtM8 DMFKXcBp7aCwP3kvnMYZUKPZsnb4OEBhLhcwWmabVue7FxxfSzj7ovHBsEycbHWbWCSc o/pgtk9IU1JoUdteEdk3kLT48szlC9HZBkn93F7MtaLbe1o3V5jF3THYzGQCRGyruxJE PneqF677AZbjAlxUmRxkOZIa8nuwg3dw6YNnhmsVfJpVtCvvPB9oeOIjWiG/vZG7UN2J 70TURGM7Q2Y2NrjcaFGM3WAL9HnNwQFbf0LYnZxwfR7yy8lxDETrLfyoqs56bDj/0Z4C 0Jvg== X-Forwarded-Encrypted: i=1; AKwUvBxuo2bsYqs/0Mp/FiS6k/Co9zQamc76nuERv45dp3Jl2zKPEOUymDSujIUM9lZHBLm5I/fl10gRUnzf008=@vger.kernel.org X-Gm-Message-State: AFuF++ne7aDrHipWYy84NrPE56JeyWneVs7OWulaiSuY6gaz6WxrYfCQ y3WkTWnOVEqaYE5uTAzRioG7Yo1sXngQ+jrB26KFHi7WQ3flMI3nKYh2vFvrPICM X-Gm-Gg: AYBFou0ettCD/7GLaJX+x7EiUliLSAvbwYnbnxK0f1y2zwzoQM8tuSP7l7ytG4WIqve MTpk3e4uxADhE/KENBU1z7ZZj916JrdZ8AvCO+L/4ZoIjvVBRflvsfNQhTGZTdagwFxGMmoiJaW wSmphp8Cf23uDywmooscwK2u9tYJhgRnsGUbQy6ZAwqzABzCj1jVXVkuPG0BJzmG/GeDQyoDk2s W6Ln8LX387pBcP1EI8gSYo/gZ4muadeKhwVSJdXO69pZZmAvAfG3olTiVav7LOvoOBOUKkGCjpG AgKA+J/6ic3CfFv9aseliHLadDT/nnzXh4/aDZ/Wno2n/RAdVkyDeD1pMjWgvFBJ+7tAy9Lgdpc KYVEeYEiis1XWFJkHono9M7duSXXXJGvphxfpZwV83a0ut6L/cEOqZc4p4AlGp4QbG3+onQi/08 pDm1boH3GXddF85Noh8YqDjPSeJY5EgRNALQT/0ItzyKkjdfC21oZaY1fKV2Z7VU92MqOfRo+Wm QqdzBCbgqJgpqSOMzYhCjBwWMsQl022Bhc5XYEXVPsuYszuxZ7QDfHaHe4t61Oby5e8bsye2asy rOU4CA== X-Received: by 2002:a05:600c:310b:b0:49e:7862:c09e with SMTP id 5b1f17b1804b1-49fe66c6289mr211174025e9.14.1790585299451; Mon, 28 Sep 2026 01:48:19 -0700 (PDT) Received: from andreayoga.localdomain (93-42-14-189.ip84.fastwebnet.it. [93.42.14.189]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a0017652d1sm182584705e9.5.2026.09.28.01.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2026 01:48:18 -0700 (PDT) From: Andrea Parri To: Christian Brauner , Carlos Maiolino , "Darrick J . Wong" , Joanne Koong , Brian Foster , Christoph Hellwig , Damien Le Moal , Hannes Reinecke , Daniel Gomez , Pankaj Raghav , Dave Chinner Cc: Andrea Parri , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v3 0/4] iomap: fix error handling regressions Date: Mon, 28 Sep 2026 10:48:05 +0200 Message-ID: X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix three independent error handling regressions in iomap: - clear the writeback context after a failed ->writeback_submit() call, preventing an already completed ioend from being submitted again; - preserve an iomap iteration error when iomap_fiemap() has a pending extent to emit; and - preserve a direct I/O data path error when sub-block tail zeroing succeeds. The three fixes have no ordering dependencies and can be applied or backported independently. Each issue was reproduced before and after its respective fix. Patch 2 is not a fix and carries no stable tag: it adds an XFS error tag (requested by Christoph) that lets patch 1's ->writeback_submit() failure be injected without the boot-param hack used for the original reproduction. The corresponding xfstest (list corruption caught via CONFIG_LIST_HARDENED on an unfixed kernel, clean writeback failure on a fixed one) was posted to fstests@vger.kernel.org: https://lore.kernel.org/all/20260924091338.198407-1-parri.andrea@gmail.com/ Changes since v2: - Patch 1: no code change; picked up Christoph's Reviewed-by. - Patch 2: fixed the alignment of the new XFS_ERRTAG_WB_COW_CONVERT_ERROR define; picked up Reviewed-by tags from Darrick and Christoph. - Patch 3: no change. - Patch 4: dropped the reformatting of the iomap_dio_zero() prototype, keeping the iomap two-tab indent style (Christoph); added the "# v6.12" stable version tag (Darrick); picked up Reviewed-by tags from Darrick and Pankaj. Changes since v1: - Patch 1: reworded the added comment to fit 80 columns (Christoph); described the reproducer in the commit message (fault-injected ->writeback_submit() failure on a reflinked XFS file, reliably hits list_add double add on the unfixed kernel); documented why the final ->writeback_submit() call in iomap_writepages() needs no equivalent fix, since wpc is never reused after it; picked up the version-scoped stable tag Darrick suggested; picked up Brian's Reviewed-by. - Patch 2: new, added per Christoph's request. - Patch 3 (was 2/3): no code change; picked up the version-scoped stable tag Darrick suggested; picked up Reviewed-by tags from Brian, Darrick, and Christoph. - Patch 4 (was 3/3): reworked per Christoph's suggestion to make iomap_dio_zero() return void and drop the handling of its return value, since it can only fail via a can't-happen WARN_ON_ONCE() assert; this also resolves Darrick's question about the local variable's type. Brian's v1 Reviewed-by was dropped due to the rework. v2: https://lore.kernel.org/all/20260924091203.198225-1-parri.andrea@gmail.com/ v1: https://lore.kernel.org/all/20260921083133.2960-1-parri.andrea@gmail.com/ Andrea Parri (4): iomap: don't resubmit an ioend after ->writeback_submit() failed xfs: add an error tag to inject a ->writeback_submit() failure iomap: don't lose a fiemap iteration error when emitting the last extent iomap: don't lose a failed direct I/O bio's error when zeroing the tail fs/iomap/direct-io.c | 16 +++++----------- fs/iomap/fiemap.c | 8 ++++---- fs/iomap/ioend.c | 10 +++++++++- fs/xfs/libxfs/xfs_errortag.h | 6 ++++-- fs/xfs/xfs_reflink.c | 5 +++++ 5 files changed, 27 insertions(+), 18 deletions(-) base-commit: 93f51579e7df248780214094418f205253383cc5 -- 2.53.0