From cbc771a4db632540725a8d57b538f3affff9eaf5 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Tue, 26 Nov 2024 19:19:36 +0000 Subject: [PATCH] os, test: make omap_iterate obligatory for ObjectStores Signed-off-by: Radoslaw Zarzynski --- src/os/ObjectStore.h | 4 +--- src/test/objectstore/ObjectStoreImitator.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index 2b6ede94cd368..df3ae920a2fed 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -798,9 +798,7 @@ public: omap_iter_seek_t start_from, std::function visitor - ) { - return -EOPNOTSUPP; - } + ) = 0; virtual int flush_journal() { return -EOPNOTSUPP; } diff --git a/src/test/objectstore/ObjectStoreImitator.h b/src/test/objectstore/ObjectStoreImitator.h index d71d7f2fe58bc..875f9041b8327 100644 --- a/src/test/objectstore/ObjectStoreImitator.h +++ b/src/test/objectstore/ObjectStoreImitator.h @@ -347,6 +347,16 @@ public: ) override { return {}; } + + int omap_iterate(CollectionHandle &c, ///< [in] collection + const ghobject_t &oid, ///< [in] object + /// [in] where the iterator should point to at the beginning + omap_iter_seek_t start_from, + std::function f + ) override { + return 0; + } + void set_fsid(uuid_d u) override {} uuid_d get_fsid() override { return {}; } uint64_t estimate_objects_overhead(uint64_t num_objects) override { -- 2.39.5