]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: giving back approx_size function
authorAdam Kupczyk <akupczyk@redhat.com>
Sun, 5 Nov 2017 20:12:44 +0000 (15:12 -0500)
committerAdam Kupczyk <akupczyk@redhat.com>
Wed, 10 Jan 2018 08:51:35 +0000 (09:51 +0100)
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
src/osd/osd_types.h

index 9dc35dc7cf3a01831b74e3c929a33184681a0ab7..86adf99aa59a08a7bb469bfb333ef41070e6e9c1 100644 (file)
@@ -3597,6 +3597,10 @@ public:
     return head.version == 0 && head.epoch == 0;
   }
 
+  size_t approx_size() const {
+    return head.version - tail.version;
+  }
+
   static void filter_log(spg_t import_pgid, const OSDMap &curmap,
     const string &hit_set_namespace, const pg_log_t &in,
     pg_log_t &out, pg_log_t &reject);