mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
When we are searching the btrfs metadata trees, we usually want only one type of item. If the last item in a search result is not of the desired type, we can restart the search at the next possible key with that item type, potentially skipping over some uninteresting items we would otherwise have to fetch, process, and discard. Also remove a bug in the previous next_min code that would skip over items if the offset overflowed and the next objectid in the tree had a lower item type number than the previous objectid. This doesn't seem to be a bug that has ever happened, as it would require a file to roll over in the offset field. Signed-off-by: Zygo Blaxell <bees@furryterror.org>