From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.burntcomma.com (mail2.burntcomma.com [217.169.27.34]) (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 BB219308F26 for ; Wed, 18 Feb 2026 11:14:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.169.27.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771413245; cv=none; b=IwTfuvqFlw/ezygsmp6AKsmbirGJehjCXDVLCHbvkDKAwvu3grmBPL53onqvqAZ/38unC1gF4HonzxpTszQ4/FcgyF6sWNEGSlk3O0Q/gQiywrYvgweWv6+pfPjjMwObBD8hZYwYxLSHzPhde615wDSiekDWu8xiegkIOgBV91k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771413245; c=relaxed/simple; bh=tN/o0kEf1vxppNamy8WE950/BoafebMHZALofF4RAvc=; h=From:To:Cc:Subject:Date:Message-ID:Mime-Version; b=BjAHCRQENcIa/mioLX0zlpmzsy34iBqevw/GgvmkOl/OXKElEXF+lHbGisoLqVfr7j30QZ6w1WXfrFB1X3Q/m4diKPiodkk8kesEuEV48cK+lx4B67avwXj408z/V5gVt6yCcIshAnMljDc0nua/9RljQPygV5Xz+mffASC9fG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=harmstone.com; spf=pass smtp.mailfrom=harmstone.com; dkim=pass (1024-bit key) header.d=harmstone.com header.i=@harmstone.com header.b=Msb04wcs; arc=none smtp.client-ip=217.169.27.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=harmstone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=harmstone.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=harmstone.com header.i=@harmstone.com header.b="Msb04wcs" Received: from beren (beren.burntcomma.com [IPv6:2a02:8012:8cf0:0:ce28:aaff:fe0d:6db2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by mail.burntcomma.com (Postfix) with ESMTPSA id B397A303658; Wed, 18 Feb 2026 11:13:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harmstone.com; s=mail; t=1771413231; bh=fSEGEAdb7AtbB9D0ARxOqBtynuN/JifSKJmGDoIkUUU=; h=From:To:Cc:Subject:Date; b=Msb04wcsp655JgVjXiMgtm1vmzMt0x7tm2wSdH6K9cs3WkZ70AFSzVRPfa2iFlYDV zto5HRBlGTJ2m/HtOPZ1goO3duS6zpzbfAvwyqVLH+xyJjcL+ci347uzvQQ4EB6svz 2GJMCGHWkGcnT/vrdecWEMWVcmo0ksEFd75udkLs= From: Mark Harmstone To: linux-btrfs@vger.kernel.org, wqu@suse.com Cc: Mark Harmstone Subject: [PATCH] btrfs: fix error messages in btrfs_check_features() Date: Wed, 18 Feb 2026 11:13:40 +0000 Message-ID: <20260218111346.31243-1-mark@harmstone.com> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Commit d7f67ac9 introduced a regression when it comes to handling unsupported incompat or compat_ro flags. Beforehand we only printed the flags that we didn't recognize, afterwards we printed them all, which is less useful. Fix the error handling so it behaves like it used to. Signed-off-by: Mark Harmstone Fixes: d7f67ac9a928 ("btrfs: relax block-group-tree feature dependency checks") --- fs/btrfs/disk-io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f39008591631..7478d1c50cca 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3176,7 +3176,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount) if (incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP) { btrfs_err(fs_info, "cannot mount because of unknown incompat features (0x%llx)", - incompat); + incompat & ~BTRFS_FEATURE_INCOMPAT_SUPP); return -EINVAL; } @@ -3208,7 +3208,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount) if (compat_ro_unsupp && is_rw_mount) { btrfs_err(fs_info, "cannot mount read-write because of unknown compat_ro features (0x%llx)", - compat_ro); + compat_ro_unsupp); return -EINVAL; } @@ -3221,7 +3221,7 @@ int btrfs_check_features(struct btrfs_fs_info *fs_info, bool is_rw_mount) !btrfs_test_opt(fs_info, NOLOGREPLAY)) { btrfs_err(fs_info, "cannot replay dirty log with unsupported compat_ro features (0x%llx), try rescue=nologreplay", - compat_ro); + compat_ro_unsupp); return -EINVAL; } -- 2.52.0