Skip to content

Commit ee143f8

Browse files
adam900710kdave
authored andcommitted
btrfs-progs: check: lowmem: recognize verity item keys
Commit 4e88bb6 ("btrfs-progs: enhance detection on unknown inode keys") added stricter validation for inode keys in the lowmem mode checker, flagging unknown key types as errors. However, it did not add cases for BTRFS_VERITY_DESC_ITEM_KEY (36) and BTRFS_VERITY_MERKLE_ITEM_KEY (37), causing any filesystem with fs-verity enabled files to fail the lowmem mode check with the following error: [5/8] checking fs roots ERROR: ITEM[257 36 0] UNKNOWN TYPE in leaf 30490624 ERROR: ITEM[257 36 1] UNKNOWN TYPE in leaf 30490624 ERROR: ITEM[257 37 0] UNKNOWN TYPE in leaf 30490624 ERROR: ITEM[257 37 2048] UNKNOWN TYPE in leaf 30490624 ERROR: errors found in fs roots Add the missing switch cases so that verity metadata items are recognized and silently skipped during the lowmem check. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e279476 commit ee143f8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

check/mode-lowmem.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,10 @@ static int check_inode_item(struct btrfs_root *root, struct btrfs_path *path)
28172817
err |= ret;
28182818
break;
28192819
case BTRFS_XATTR_ITEM_KEY:
2820+
case BTRFS_VERITY_DESC_ITEM_KEY:
2821+
case BTRFS_VERITY_MERKLE_ITEM_KEY:
28202822
break;
2823+
28212824
default:
28222825
error("ITEM[%llu %u %llu] UNKNOWN TYPE in leaf %llu",
28232826
key.objectid, key.type, key.offset, node->start);

0 commit comments

Comments
 (0)