]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: properly flag filesystem with BTRFS_FEATURE_INCOMPAT_BIG_METADATA
authorNikolay Borisov <nborisov@suse.com>
Thu, 23 Jun 2022 07:55:47 +0000 (10:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:24 +0000 (14:24 +0200)
commit306b3b5b126caeb8e99160b8a95a2bb349d09492
tree1a4e78182bf9ab2dac4b2ad010403112b776862a
parent99f7e0799327ab85f96f277d03dbfeab03810f3c
btrfs: properly flag filesystem with BTRFS_FEATURE_INCOMPAT_BIG_METADATA

[ Upstream commit c3660423c7bdcf6a4011fd0dd7455cce1a4b0b5f ]

Commit 066cad67b8db seemingly inadvertently moved the code responsible
for flagging the filesystem as having BIG_METADATA to a place where
setting the flag was essentially lost. This means that
filesystems created with kernels containing this bug (starting with 5.15)
can potentially be mounted by older (pre-3.4) kernels. In reality
chances for this happening are low because there are other incompat
flags introduced in the mean time. Still the correct behavior is to set
INCOMPAT_BIG_METADATA flag and persist this in the superblock.

Fixes: 066cad67b8db ("btrfs: fix upper limit for max_inline for page size 64K")
CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/disk-io.c