mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-23 00:07:07 +03:00
cmd_list_journal: Tweak extent matching
Extents can now additionally be matched by the end position, the same as normal keys. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
3e39c57c70
commit
2d7982de78
@ -61,14 +61,13 @@ static bool bkey_matches_filter(d_bbpos filter, struct jset_entry *entry, struct
|
||||
if (i->btree != entry->btree_id)
|
||||
continue;
|
||||
|
||||
if (!btree_node_type_is_extents(i->btree)) {
|
||||
if (bkey_eq(i->pos, k->k.p))
|
||||
return true;
|
||||
} else {
|
||||
if (bkey_ge(i->pos, bkey_start_pos(&k->k)) &&
|
||||
bkey_lt(i->pos, k->k.p))
|
||||
return true;
|
||||
}
|
||||
if (bkey_eq(i->pos, k->k.p))
|
||||
return true;
|
||||
|
||||
if (btree_node_type_is_extents(i->btree) &&
|
||||
bkey_ge(i->pos, bkey_start_pos(&k->k)) &&
|
||||
bkey_lt(i->pos, k->k.p))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user