Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3E3662874E6; Thu, 20 Aug 2026 15:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238559; cv=none; b=RB7bESGU3IYlV78ukK79CoDri2N8i6I3+s2quA8KRa69ocqjzNlIv0XNdK8ENNwVQpLZyN5k/K7F1CfPw5P7uD5DzHAWt75Nr5SB1btdOu62k1jMgr42yO/fye5TIJerEs6XnXtgrhYyloYzqabFkCj5tbS8S162gUQWVS3ueq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238559; c=relaxed/simple; bh=Vs9qJTIXFO4RXgimI6Gzt4l+jhP7Oac0mljzhpMC0qE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BiUxitQO4fijOU0WgYbNCKZ0VWUabmAy0I0WNm44hO2pYFngFr6LOjoGv0Yp9/gpEMO8wMmshu6scrdYMufozPVC8VRMC8vgtVXLwXEfZd5p12bnIUbV6D3kFJQPuCLbMZ1gzSCfOQDCudiLzaPA4sbG3ieMpmmzGJVTbfhrc7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VnWzRnka; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VnWzRnka" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84A321F000E9; Thu, 20 Aug 2026 15:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787238558; bh=bYz1VVf92jzl6p74W8duv1vOkd1wf8HFmo74LFMBWXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VnWzRnkagtlyf9R+lqXI9TIgR0kd4kgpv7UuKvKFw65ruuH/eXmBxUO0WBemfiBC8 2jnRB+QWtylH6tu1tVpYBG/PG7kVer5CsicOwHqDKtDCIfvEbBGFaEGRhz1TbaodDE N2WxQKispC4tqIWMu3GN9LKDT674139rqPRYaPKI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christoph Hellwig , "Darrick J. Wong" , Carlos Maiolino Subject: [PATCH 7.1 150/228] xfs: check v5 superblock features early Date: Thu, 20 Aug 2026 16:54:52 +0200 Message-ID: <20260820145249.190064322@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145244.450574346@linuxfoundation.org> References: <20260820145244.450574346@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christoph Hellwig commit eb6b2cc1fc8ad566d746d128a559989ff0bba5cc upstream. When working on a new features that reuses the existing pad in the superblock, I noticed that mounting such a file system on an old kernel logs a rather confusing warning: XFS (vdc): Metadir superblock padding fields must be zero. This is because we only validate the various feature fields in v5 superblocks after the common superblock validation helper is called. Fix this by calling the feature validation first. Fixes: eca383fcd63b ("xfs: refactor superblock verifiers") Cc: # v4.19 Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino Signed-off-by: Greg Kroah-Hartman --- fs/xfs/libxfs/xfs_sb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c @@ -1118,10 +1118,10 @@ xfs_sb_read_verify( * because _verify_common checks the on-disk values. */ __xfs_sb_from_disk(&sb, dsb, false); - error = xfs_validate_sb_common(mp, bp, &sb); + error = xfs_validate_sb_read(mp, &sb); if (error) goto out_error; - error = xfs_validate_sb_read(mp, &sb); + error = xfs_validate_sb_common(mp, bp, &sb); out_error: if (error == -EFSCORRUPTED || error == -EFSBADCRC)