aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/tree-checker.c')
-rw-r--r--fs/btrfs/tree-checker.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index cab0b1f1f741..1a4e2b101ef2 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -389,13 +389,11 @@ static int check_block_group_item(struct btrfs_fs_info *fs_info,
389 389
390 /* 390 /*
391 * Here we don't really care about alignment since extent allocator can 391 * Here we don't really care about alignment since extent allocator can
392 * handle it. We care more about the size, as if one block group is 392 * handle it. We care more about the size.
393 * larger than maximum size, it's must be some obvious corruption.
394 */ 393 */
395 if (key->offset > BTRFS_MAX_DATA_CHUNK_SIZE || key->offset == 0) { 394 if (key->offset == 0) {
396 block_group_err(fs_info, leaf, slot, 395 block_group_err(fs_info, leaf, slot,
397 "invalid block group size, have %llu expect (0, %llu]", 396 "invalid block group size 0");
398 key->offset, BTRFS_MAX_DATA_CHUNK_SIZE);
399 return -EUCLEAN; 397 return -EUCLEAN;
400 } 398 }
401 399
@@ -440,7 +438,7 @@ static int check_block_group_item(struct btrfs_fs_info *fs_info,
440 type != (BTRFS_BLOCK_GROUP_METADATA | 438 type != (BTRFS_BLOCK_GROUP_METADATA |
441 BTRFS_BLOCK_GROUP_DATA)) { 439 BTRFS_BLOCK_GROUP_DATA)) {
442 block_group_err(fs_info, leaf, slot, 440 block_group_err(fs_info, leaf, slot,
443"invalid type, have 0x%llx (%lu bits set) expect either 0x%llx, 0x%llx, 0x%llu or 0x%llx", 441"invalid type, have 0x%llx (%lu bits set) expect either 0x%llx, 0x%llx, 0x%llx or 0x%llx",
444 type, hweight64(type), 442 type, hweight64(type),
445 BTRFS_BLOCK_GROUP_DATA, BTRFS_BLOCK_GROUP_METADATA, 443 BTRFS_BLOCK_GROUP_DATA, BTRFS_BLOCK_GROUP_METADATA,
446 BTRFS_BLOCK_GROUP_SYSTEM, 444 BTRFS_BLOCK_GROUP_SYSTEM,