From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (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 444FD30DED5 for ; Sat, 1 Aug 2026 22:01:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785621700; cv=none; b=sMmLvTVPYdKa02O31+t4YH1S6qJ4sj9GtFk9AYnCxCD6Jf5led398m33hVbyL3FDIAAIcTpNt+NJGCb+Ne4mqaXUTr3ycIvP756YFWrBPrTigWqoW6OHhJW/V+qMTQtvHyzYRgRpYRDb770+x+UKW0dbZI7dPEXFN1XpzDZYcrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785621700; c=relaxed/simple; bh=/v7VBJbAb9aO5qRUONItTpWH4owbSyqDIsLqUgwMCt0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=epLhpg/YvTOWrUdWtk7iQoFY6NxOdnIL38cdAXzFYGAZ6srStyWV1pJcb8jQrtAiMVxpGFnD5cj2IjsXqCtXsS84XfbXlwdUoBp6sAGIxCj/4U/6okDnzfjgZEuBsSWeY7wzDMOMAGEN4anQ05hNKthsWqzjrbdgepgvzhWEaNw= 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=cONoK9DE; arc=none smtp.client-ip=209.85.128.182 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="cONoK9DE" Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-81ee41aaec1so29634227b3.3 for ; Sat, 01 Aug 2026 15:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785621696; x=1786226496; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=XvLI01z2FUEK9ccgzSRudNIsKkvOOlfj4ulYih3+qTw=; b=cONoK9DEybQyse0MMTQ578SeX73NzsGajXVpScsaVCJ+Q1kArj6DfxOs2OefFKR2K5 uJMfUUjnbC/vVh4s+ij14YZW41ohWsko3lGk8C16Q6ICvWjdXbC/fZZupzXFfsJA+c6Z o7tCP54FlCsxzO1DWuiLIvDAhEKlnlsPKfJBYkbbvC9JeNHC/7QqAAYrMPtNJXY6GrMj CZOPk6hpy/Ujf3U+k72bjN9mHQ7hXN7Mjk1+9ky5SfnQ0dBAKQ+RAayPm09T6WRAoa6i TqqKi1B1w1iG8gWtbWmvBZcvS+rv5GfHCb92w0oSCPudhnQS3MGXHCr//Ng5XGCVnuhQ oBTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785621696; x=1786226496; h=content-transfer-encoding:mime-version:references:in-reply-to :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=XvLI01z2FUEK9ccgzSRudNIsKkvOOlfj4ulYih3+qTw=; b=dAjXobGu9YbwSQBcYlEj2xZtX514tLvXZLVXtW7uDjvQ4GjT9AxRmba/rtkUOGuYi4 4FZqfuyKDGSkKm0kRRshS9jvIqD0Eu9y9k5yYMYmmdLwZ8wfo/BsTI/x6FIDAVa/4NX2 nzLSmHvF+aJ6H2VRr4JpQ88JZ1XWKPHWCv/p14lFsEnGB9UgRvY+4jY2v7NwLtSIr4hJ ZD/aW/efkVbSz7B3NZrOqyLPejcQenCvgE2RBofQHybqETB+SlUJwgSmvIhW7o9Ileh2 tCIM9XKYe0HGFoNA8K6dI/dsFoPhrywIH+lN0ZQV51GgmRhYIDrBbh0X23ftpkiRibBf A08g== X-Forwarded-Encrypted: i=1; AHgh+RpvgMgwDDSEqM65HSE21AC4EHqOETVL+S1eWvOeTvU8sildLYl63crM47q3f3GZI9VgjSWzTNDS6yBO4dU=@vger.kernel.org X-Gm-Message-State: AOJu0Yzkg0CYUPIzkI5swzr6/8mhEOPZmhSFFdrRYFio/+D1JtJkVAly 3oMsbhy+V1takI8ZxC/nNVkarHdxKlChIg2DhPzKK9il0QYnPhq6iayv X-Gm-Gg: AR+sD12w/S8uQohBU7GVJmJxCIFTPRlpzT+vrmW7qLBg61Ss+ATSJhzJ2mTYlhmZtQk qknTCaZOwpwDlcWmPcfBUStORYpT8CPuUFxMd1JR6LTEhT06ajFmn5hE9uvm0Uj15ELJK5vrWRv OEvmhbtbNSprOlqwQHqqJE3O2F52QO7xrvhH5POUt28kO1uBS8GTVWC7g5JQll1yPIVp9GfQPUV zijLP1pKJSvCwGtbwen/31QSYnO7fiGdkNiCNkqUAeUVv6BVRQHi1I8IaXNen35DC5SI4kepsM1 /JAnPOovP1l0aSHTu1knwLvZT0wHgWcUkNpvbYiQpEeuZIhVIICS+kr1eiZVmrjbpE/x6aen4qO Y59gzFN8k/kQUfsiw/tTGFA5CLE2cjcUolHr3AKVUxmWVDBH5x91NMLe1+Ny+3quG+xLFBMDebx k5Qxnjc14Fup96PcC0WS2VGdkZqhQepcu49heN5lMkbn02GCFXNrjW3KfQzA1SZpLVJLjYKPsBk /AZPaiTfDz3O97rqeA= X-Received: by 2002:a05:690c:eca:b0:7ff:87e1:34d1 with SMTP id 00721157ae682-81fd4a5a892mr78630197b3.11.1785621696163; Sat, 01 Aug 2026 15:01:36 -0700 (PDT) Received: from syssplab.cs.fiu.edu (nat1.cs.fiu.edu. [131.94.134.89]) by smtp.gmail.com with ESMTPSA id 00721157ae682-81fcd0d6fbbsm29903767b3.25.2026.08.01.15.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2026 15:01:35 -0700 (PDT) From: Chao Shi To: Jan Kara , Christian Brauner , Alexander Viro , Matthew Wilcox , linux-fsdevel@vger.kernel.org Cc: Theodore Ts'o , Andreas Dilger , Baokun Li , Ojaswin Mujoo , Ritesh Harjani , Zhang Yi , Bob Copeland , Namjae Jeon , Sungjong Seo , Yuezhang Mo , OGAWA Hirofumi , Mark Fasheh , Joel Becker , Joseph Qi , Andreas Gruenbacher , linux-ext4@vger.kernel.org, ocfs2-devel@lists.linux.dev, gfs2@lists.linux.dev, linux-karma-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Shi Subject: [PATCH 18/19] ext4, jbd2: report fast commit write errors with BH_Write_EIO Date: Sat, 1 Aug 2026 18:01:02 -0400 Message-ID: <7f988ec74b5d1135d5d67771240639e57ba9e0f4.1785621505.git.coshi036@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ext4_end_buffer_io_sync() is the third completion handler in this series that reports a failed write by clearing BH_Uptodate, and jbd2_fc_wait_bufs() is the only thing that looks at the result. Convert both. They have to move in the same patch. The handler lives in ext4 and the wait in jbd2, but neither is used by anything else: the buffers are ext4's fast commit blocks, submitted by ext4_fc_submit_bh() and waited for by jbd2_fc_wait_bufs(). Converting one without the other silently disables fast commit write error reporting. Signed-off-by: Chao Shi --- fs/ext4/fast_commit.c | 2 +- fs/jbd2/journal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 8e2259799614..8cd60c9f2272 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -213,7 +213,7 @@ static void ext4_end_buffer_io_sync(struct bio *bio) } else { ext4_debug("%s: Block %lld not up-to-date", __func__, bh->b_blocknr); - clear_buffer_uptodate(bh); + mark_buffer_write_io_error(bh); } unlock_buffer(bh); diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 9e4cb04587b4..ffe7a22e6699 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -890,7 +890,7 @@ int jbd2_fc_wait_bufs(journal_t *journal, int num_blks) * Update j_fc_off so jbd2_fc_release_bufs can release remain * buffer head. */ - if (unlikely(!buffer_uptodate(bh))) { + if (unlikely(buffer_write_io_error(bh))) { journal->j_fc_off = i + 1; return -EIO; } -- 2.43.0