]> git.hungrycats.org Git - bees/commit
btrfs-tree: clean up the fetch function's return set
authorZygo Blaxell <bees@furryterror.org>
Tue, 11 Feb 2025 05:04:35 +0000 (00:04 -0500)
committerZygo Blaxell <bees@furryterror.org>
Thu, 19 Jun 2025 01:17:48 +0000 (21:17 -0400)
commit80f9c147f780063735da6fc20fc373dd5e72a1c0
tree3e1e4163b14338ba0fa39ce77f6f5007791abdba
parent50e012ad6ddec9a2233309f88225e0f10348fbfd
btrfs-tree: clean up the fetch function's return set

Commit d32f31f411eeb1a8624b99dab223af69f0c8453e ("btrfs-tree: harden
`rlower_bound` against exceptional objects") passes the first btrfs item
in the result set that is above upper_bound up to `seek_backward`.
This is somewhat wasteful as `seek_backward` cannot use such a result.

Reverse that change in behavior, while keeping the rest of the other
commit.

This introduces a new case, where the search ioctl is producing items
that are above upper bound, but there are no items in the result set,
which continues looping until the end of the filesystem is reached.
Handle that by setting an explicit exit variable.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
lib/btrfs-tree.cc