Before the patch the method was looking for `lower_bound(oid.snap)`
from `SnapSet::clones` which leads to reading from head instead of
returning the `ENOENT` expected in `TestLibRBD.TestIOToSnapshot`.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
if (std::find(
citer->second.begin(),
citer->second.end(),
- *clone) == citer->second.end()) {
+ oid.snap) == citer->second.end()) {
+ logger().debug("{} {} does not contain {} -- DNE",
+ __func__, ss.clone_snaps, oid.snap);
return std::nullopt;
} else {
auto soid = oid;