Skip to content

Commit eb292f7

Browse files
committed
btrfs-progs: check/lowmem: fix false alerts about EXTENT_OWNER
[BUG] When simple quota is enabled, lowmem will give false alerts: [3/8] checking extents ERROR: extent[13631488 168 1048576] has unknown ref type: 172 ERROR: extent[63963136 168 131072] has unknown ref type: 172 ERROR: extent[63963136 168 131072] has unknown ref type: 172 ERROR: file extent[257 0] root 256 owner 256 backref lost ERROR: extent[13631488 168 1048576] has unknown ref type: 172 ERROR: file extent[258 0] root 256 owner 256 backref lost ERROR: errors found in extent allocation tree or chunk allocation [CAUSE] Lowmem mode has strict checks on the inlined backref type, and unfortunately EXTENT_OWNER_REF is not inside the support 4 backre types, thus it's treated as an unknown type, and caused the false alerts. [FIX] Add the EXTENT_OWNER_REF type into the supported types. For lowmem check itself, those key types are just skipped as it's only to indicate the owner of a data extent, which will be verified by qgroup part. Signed-off-by: Qu Wenruo <wqu@suse.com>
1 parent c2c8d98 commit eb292f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

check/mode-lowmem.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,6 +3053,7 @@ static int check_extent_inline_ref(struct extent_buffer *eb,
30533053
case BTRFS_EXTENT_DATA_REF_KEY:
30543054
case BTRFS_SHARED_BLOCK_REF_KEY:
30553055
case BTRFS_SHARED_DATA_REF_KEY:
3056+
case BTRFS_EXTENT_OWNER_REF_KEY:
30563057
ret = 0;
30573058
break;
30583059
default:
@@ -4645,6 +4646,12 @@ static int check_extent_item(struct btrfs_path *path)
46454646
parent = offset;
46464647
tmp_err |= check_shared_data_backref(offset, key.objectid);
46474648
break;
4649+
case BTRFS_EXTENT_OWNER_REF_KEY:
4650+
/*
4651+
* This is showing the initial owner for SIMPLE QUOTA.
4652+
* It will be hanled by qgroup check, skip it here.
4653+
*/
4654+
break;
46484655
default:
46494656
error("extent[%llu %d %llu] has unknown ref type: %d",
46504657
key.objectid, key.type, key.offset, type);

0 commit comments

Comments
 (0)