Skip to content

Commit f46a283

Browse files
fdmananakdave
authored andcommitted
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>
1 parent 2155d0c commit f46a283

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

fs/btrfs/disk-io.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,18 +2416,18 @@ int btrfs_validate_super(const struct btrfs_fs_info *fs_info,
24162416

24172417
/* Root alignment check */
24182418
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));
24212421
ret = -EINVAL;
24222422
}
24232423
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",
24252425
btrfs_super_chunk_root(sb));
24262426
ret = -EINVAL;
24272427
}
24282428
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));
24312431
ret = -EINVAL;
24322432
}
24332433

0 commit comments

Comments
 (0)