Skip to content

Commit 8fd9b03

Browse files
committed
osd/SnapMapper: Crimson - fix OSDriver::get_next
There are other omap_keys that we may return which are not SnapMapper entries (_biginfo, _epoch, _fastinfo etc.). Signed-off-by: Matan Breizman <[email protected]>
1 parent d489704 commit 8fd9b03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/osd/SnapMapper.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ int OSDriver::get_next(
119119
ch, hoid, key
120120
).safe_then_unpack([&key, next] (bool, FuturizedStore::Shard::omap_values_t&& vals) {
121121
CRIMSON_DEBUG("OSDriver::get_next key {} got omap values", key);
122-
if (auto nit = std::begin(vals); nit == std::end(vals)) {
122+
if (auto nit = std::begin(vals);
123+
nit == std::end(vals) || !SnapMapper::is_mapping(nit->first)) {
123124
CRIMSON_DEBUG("OSDriver::get_next key {} no more values", key);
124125
return -ENOENT;
125126
} else {

0 commit comments

Comments
 (0)