Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: change unaligned root messages to error level in btrfs_validate_super()

If the root nodes for the chunk root, tree root or log root are not sector
size aligned, we are logging a warning message but these are in fact
errors that makes the super block validation fail. So change the level of
the messages from warning to error.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Filipe Manana and committed by
David Sterba
f46a283b 2155d0c0

+5 -5
+5 -5
fs/btrfs/disk-io.c
··· 2416 2416 2417 2417 /* Root alignment check */ 2418 2418 if (!IS_ALIGNED(btrfs_super_root(sb), sectorsize)) { 2419 - btrfs_warn(fs_info, "tree_root block unaligned: %llu", 2420 - btrfs_super_root(sb)); 2419 + btrfs_err(fs_info, "tree_root block unaligned: %llu", 2420 + btrfs_super_root(sb)); 2421 2421 ret = -EINVAL; 2422 2422 } 2423 2423 if (!IS_ALIGNED(btrfs_super_chunk_root(sb), sectorsize)) { 2424 - btrfs_warn(fs_info, "chunk_root block unaligned: %llu", 2424 + btrfs_err(fs_info, "chunk_root block unaligned: %llu", 2425 2425 btrfs_super_chunk_root(sb)); 2426 2426 ret = -EINVAL; 2427 2427 } 2428 2428 if (!IS_ALIGNED(btrfs_super_log_root(sb), sectorsize)) { 2429 - btrfs_warn(fs_info, "log_root block unaligned: %llu", 2430 - btrfs_super_log_root(sb)); 2429 + btrfs_err(fs_info, "log_root block unaligned: %llu", 2430 + btrfs_super_log_root(sb)); 2431 2431 ret = -EINVAL; 2432 2432 } 2433 2433