Skip to content

Commit cbc771a

Browse files
committed
os, test: make omap_iterate obligatory for ObjectStores
Signed-off-by: Radoslaw Zarzynski <[email protected]>
1 parent e3df536 commit cbc771a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/os/ObjectStore.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,9 +798,7 @@ class ObjectStore {
798798
omap_iter_seek_t start_from,
799799
std::function<omap_iter_ret_t(std::string_view,
800800
std::string_view)> visitor
801-
) {
802-
return -EOPNOTSUPP;
803-
}
801+
) = 0;
804802

805803
virtual int flush_journal() { return -EOPNOTSUPP; }
806804

src/test/objectstore/ObjectStoreImitator.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,16 @@ class ObjectStoreImitator : public ObjectStore {
347347
) override {
348348
return {};
349349
}
350+
351+
int omap_iterate(CollectionHandle &c, ///< [in] collection
352+
const ghobject_t &oid, ///< [in] object
353+
/// [in] where the iterator should point to at the beginning
354+
omap_iter_seek_t start_from,
355+
std::function<omap_iter_ret_t(std::string_view, std::string_view)> f
356+
) override {
357+
return 0;
358+
}
359+
350360
void set_fsid(uuid_d u) override {}
351361
uuid_d get_fsid() override { return {}; }
352362
uint64_t estimate_objects_overhead(uint64_t num_objects) override {

0 commit comments

Comments
 (0)