Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp31345lqz; Fri, 29 Mar 2024 07:42:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMAI+7IaulvE9H4LDQch0iW1Gv0t633BbksROR9YTf47o8eWrEfmZ3NGbrXOki9aOomGe043rfqZXpc38sBsxQOoFNYE0o+u1CyLd6+g== X-Google-Smtp-Source: AGHT+IFf9KrT6KvH4hRm/HZeak2R1FT8ww1h9D1Wsl1VYWvlyD9h3ik8WctC8cUsXJyQe9BsYuNX X-Received: by 2002:a05:6402:35ca:b0:56b:b5a1:4685 with SMTP id z10-20020a05640235ca00b0056bb5a14685mr2024185edc.27.1711723334755; Fri, 29 Mar 2024 07:42:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711723334; cv=pass; d=google.com; s=arc-20160816; b=FJNXArA8Ym6n0vMGQeynOYFZyFqBXIdVy7VJp0xgyuHgwMoCZRfX+72u6yPhLvnEwl hypGe5JkDxeazDVsWyf+P3mKTvxHJcUSyp0xS3Fwu/u6VWoTxQwgzcz2Cz8G5VqUWcQ5 VjMOTKxC6G1xbfY7i3W4+6kmx8TjfAib39mmqPZdHHF42HL7hTIONiFB6neQlEH7BVkr fID8vOkAcFHbiq3nm+jXp7TBB3MQp+xGMyxJb9J51MDUG7h6sGu7aJgcG1W1O32pUapz AjktqJXDeXvycj6pBjLA19hAOmygPHWesrpQH8CuLJ516bu/QstwtpfVf+hSO01NqChi cpEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NUw7a9Q8kI4iJ048JzmG9oFmrmzBO7ATBvm90vNxyrk=; fh=S4Tq1gTzbwhP/S9yzqsfxVdk2nyHcwNq4n7F/wmx2Ek=; b=x8YkvIHTcUDTCNmjC0fQ0crh08Mr73y1S2EYZCtBTBHjdKa6RAV73h2XOKTjCxP85Y y4uI0odqmvUkau6KDXCEFrs0HAdxMvwIq8NUTpiiPwmfz5RXXv+TcgTslHn5wkS4wi5y gKMP5QmBXTgD8lmfmCSisEuUxdCPrBZkRvgrU+TM0GkYWU5LQJbqqmJILXUW1gZPXiuf 5OPTGkWpPxrXGJb9BIWCsp//AWKFg8tbyX8fHowemjsOdeuuABpG7JKTf67dly5cNTRz Da5rL0ju1jl+g6aI2aph2P75aMUOlDE7RGSCsvuN6DJBQAOf2whwHJSQcFtjhyQfCEgQ cHOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DcCZr4ZL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124906-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v3-20020a056402348300b0056c53f9dc49si1698928edc.257.2024.03.29.07.42.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 07:42:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DcCZr4ZL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124906-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 89F321F29E5C for ; Fri, 29 Mar 2024 14:23:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 879DF27BBD4; Fri, 29 Mar 2024 12:46:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DcCZr4ZL" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A5FFA27BBDD; Fri, 29 Mar 2024 12:46:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716406; cv=none; b=YJv6J/0eqJHSpYxGJp2I7an9oh5bgrXrlYE4G2jv9O39PYQ5p0Bt0500CezBc8tvFvgvnPlYloEyM/dUkT4dvvY4M/SQeJcMwR9pACJWRUDtEqoDE0nL1a/XVKumVsIZiYgnB0pJDfoRZ5ibo+mSXY4GkE1Sm0t1wpYvwxwEJSo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716406; c=relaxed/simple; bh=49nvPWEf6dsNsBY8pMX1qZko0jdBwOudJbNDf6HgQe0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YN+H2BgYC6j296wg6V2TEWeDdzfZLV2jgVv6AvBqeXvxAlzB2dYFjmIdTHZGzUqT7iQJ0LR5Y9G6DMAfpPBrDk6ekc9Tbf8pU0+ZhfDTa9PO+kWqYbqmEKFPDRTtyV512IE0CmLf8KygoC53nJ2AoktxOZgG9YUSqeTJ4/laYKE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DcCZr4ZL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91E91C433F1; Fri, 29 Mar 2024 12:46:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716406; bh=49nvPWEf6dsNsBY8pMX1qZko0jdBwOudJbNDf6HgQe0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DcCZr4ZL19p0XJZEVAI8wrE2JMobbBb0+A5saOComeYtRJA3iC7HDOGW/LUg01mLb L91z8K8ZwzsIwsOw/d2y2s8mksNCFblkwCoegquxWPfEAc8GvtqOyCLw/0sSgbcXl4 oYmCzzARoZdbuGSfKj8IAq298FCnKFDR4q53u79cKr7PHaNTjCp+PMrwksxS9tk8mD i5D0voEpZwS9svYTZIfryVrK6JdMfSNcqvw8x7z+z/6i5k0+j6aiScDOzIRO5O9dJY GTqxa5msi+bHt5gU++U0U69Hqt2L4LT7PMshNzfEPvfucnZ4ZUyxxZ79WF05nj74z1 /xiemfZ81CMYA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zhang Yi , Jan Kara , Theodore Ts'o , Sasha Levin , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 22/52] ext4: add a hint for block bitmap corrupt state in mb_groups Date: Fri, 29 Mar 2024 08:45:16 -0400 Message-ID: <20240329124605.3091273-22-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329124605.3091273-1-sashal@kernel.org> References: <20240329124605.3091273-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.83 Content-Transfer-Encoding: 8bit From: Zhang Yi [ Upstream commit 68ee261fb15457ecb17e3683cb4e6a4792ca5b71 ] If one group is marked as block bitmap corrupted, its free blocks cannot be used and its free count is also deducted from the global sbi->s_freeclusters_counter. User might be confused about the absent free space because we can't query the information about corrupted block groups except unreliable error messages in syslog. So add a hint to show block bitmap corrupted groups in mb_groups. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240119061154.1525781-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- fs/ext4/mballoc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 6a3e27771df73..1212559236cc5 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2905,7 +2905,10 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v) for (i = 0; i <= 13; i++) seq_printf(seq, " %-5u", i <= blocksize_bits + 1 ? sg.info.bb_counters[i] : 0); - seq_puts(seq, " ]\n"); + seq_puts(seq, " ]"); + if (EXT4_MB_GRP_BBITMAP_CORRUPT(&sg.info)) + seq_puts(seq, " Block bitmap corrupted!"); + seq_puts(seq, "\n"); return 0; } -- 2.43.0