From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.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 F3FE248B385 for ; Thu, 6 Aug 2026 17:00:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786035608; cv=none; b=onwrKGZrgs7MOmOGwo6rvlzXcikZQJyN5vZpxsIY+dPtsLO5uCdwh46q1giCa3JT3ZROqMqmGWvoMvTJUzaMpevMay5qZ+vzBVp3UW3JSrjk+WTbVbKixzzeV2+sdnZ9F10IrL2Y1Ezzr9qngKsyo/qFa39+oi7cX59LaJ/Z0Bg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786035608; c=relaxed/simple; bh=nwDfftK6tDKKFwsyIY1zmP/nNMRDmqL5O9HNMSOfLoA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=karXQ5OpzfWHXG5dNTDdPUw454QptN1CYvJjUuac6/PsSMkFATwiOAeiv+B/ILfy3Bff2znyUd0xmVvKtn7HUz3HTLCxzUqqDFQUtER0Fhd12moKtxUEUI7yw+7oH+hxkvxic0AGBIyw3+tVo8z5Tfl48aFEBfJnwkJHLOF0Jzw= 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=RpJjo3Df; arc=none smtp.client-ip=209.85.221.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="RpJjo3Df" Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-5c3163a88a1so678097e0c.3 for ; Thu, 06 Aug 2026 10:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786035606; x=1786640406; 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=VOSQ52yeWBlRERTYkX4++c0c05H07NL60x8ILsT5aXA=; b=RpJjo3Df9WQveeK5T0fUBs9J7PtwKjP6ioFb1A9txPdlCDx0C30fHZz8SkCYXE9rXT vleecIQEGfHJtpZcIhsM7jqm+xVr0aCFNRX0/X7mSCfVkrSbunGL7BWRDx/0L6ovsFh/ HFKnEh9dt5/H4ecILk9rfj+ElJQqahGBT9ILKccOnbElXJLsaHSwxQK7nH04BNmB3k2b GUQTrrMxcUEf5NSI1p9U3ogHsfCLme+6vl9l43I259uy7drmEHz+MromgdxrLR8PvIDK tlQY0/sUZa0iOnRQTEd/QScs8bSIGkMoHa3ICCftGpd1M2nEkyheJjM6zfH2Q2tfz1rO EZmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786035606; x=1786640406; 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=VOSQ52yeWBlRERTYkX4++c0c05H07NL60x8ILsT5aXA=; b=TP8h7NQQ4tgZIZpO5wwrA9ahYbCV2EQDVGm7BNBy08PRhvRUvBq7+PjLurzo6Jy20V fDyri3dN2uLebg2vso34AkaDc+AznjgPjutfRcPmyPcW9E1Eg2TAg7sbFMfKHbEqwo0S S/DMbS4v+s3wbB1vKk3+ij2lAQ6Fs+gDb8UKT7y+qMGSI4gUcnxc3o1tydMZ+XJx4kfm NiuaE/Pl9tewLeTDhuHODnwmVi5+ErWBM6mOmBsTxyF5G81xi68VTR+pht2hfzyTI4PB 0dAgS61eNQp6gs18Dk7LHLcCCHHyoYzRQksG/tc4OmF8zxKXezGNR8r2BAX3rgjTgHk4 p3CA== X-Forwarded-Encrypted: i=1; AHgh+Rr+K1JwXjJF5IWtqpIFHLd7le+oics76of5nwMgaex4R3U7Qo7d7M4sHSXSVSEM4fZ7o3Pn6wheS7uu0V8=@vger.kernel.org X-Gm-Message-State: AOJu0YwDrysKPARrTD6cAW/k3WLyfo6TznqVVbt5UhcCoHSQf/iZnmYf zp97feeevwde2Xd/Et3yVqNDGWnh51dgcTMHY6PO3neB1Vx197c5URJb X-Gm-Gg: AR+sD12IlajcHEkxG4qFCCtY1tJzTWXGNzU9ewcaeujR95VMVT8sHW11z+bzoKMqXCl EWUJuKReNIzu5NQ9H3Igd7Zt08jnBimX6v07icxuUBrCmkzWm5QPMK8Y2o1OrJtoPVRlxYtGmz1 Qz2/sbcwuygPJSnQFUR2NLUjFMN8Q21BevhmP4M4jbjZD5F3rUesNbuwGknKGl+Aq/GSnlge+xs W4ovA2KBlTmNNptYzRHLEcyTiFwgcO56yUdpr5sW/h3CY18Slk6e/LUUZhuUyfrVyS/hW27u5Bx SSMo6pY6kciVEBwbHGA0clJOVyNmQBOd5k+H6NFuGKCrEj6IXR2ZFPjXX/a9VKwaIQ+MgiDpI7c va+7Ez/bEX9Sc212//S5IzD5AkwfecZ1+YqC8iOnEaOEFW7lnRAQPZx7uVAf3j+0f8DeFwXi+14 fFRqER+vZ1HaWH2cNuQ+mJB+pBdAhpc6i4uvRSnOwDCaMZCtYGYqvGGM47hKSBjvbAXE6kzzxtx XMQgmg= X-Received: by 2002:a05:6122:8f88:b0:5bf:b3a0:388c with SMTP id 71dfb90a1353d-5c3d91849cemr2185136e0c.6.1786035605840; Thu, 06 Aug 2026 10:00:05 -0700 (PDT) Received: from syssplab.cs.fiu.edu (nat1.cs.fiu.edu. [131.94.134.89]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5c3d05c594fsm3706321e0c.8.2026.08.06.10.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2026 10:00:05 -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 , 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-kernel@vger.kernel.org, Chao Shi , Weidong Zhu Subject: [PATCH v2 18/21] jbd2: say what jbd2_freeze_jh_data()'s assertion is actually checking Date: Thu, 6 Aug 2026 12:58:41 -0400 Message-ID: <713ffb9c0cdfe55499b3cdd2c06a59a2c152c46c.1785951556.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 The assertion that the buffer about to be copied out is up to date is correct and stays, but its message - "Possible IO failure" - describes what a buffer that is not up to date used to mean rather than what is being checked. Once this series stops clearing BH_Uptodate on write error, that reading is wrong twice over. A failed write no longer makes a buffer not up to date, and a buffer that does carry BH_Write_EIO is fine here: it still holds valid data and the journal will write it again. What the assertion is really guarding is that there is something valid to copy at all. Say that instead. Suggested-by: Jan Kara Acked-by: Weidong Zhu Signed-off-by: Chao Shi --- fs/jbd2/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 5cc7d097b2ac..85d84d909f78 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -920,7 +920,7 @@ static void jbd2_freeze_jh_data(struct journal_head *jh) char *source; struct buffer_head *bh = jh2bh(jh); - J_EXPECT_JH(jh, buffer_uptodate(bh), "Possible IO failure.\n"); + J_EXPECT_JH(jh, buffer_uptodate(bh), "Buffer not uptodate!\n"); source = kmap_local_folio(bh->b_folio, bh_offset(bh)); /* Fire data frozen trigger just before we copy the data */ jbd2_buffer_frozen_trigger(jh, source, jh->b_triggers); -- 2.43.0