]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedBackend: add bl-based setkeys/rmkeys
authorSage Weil <sage@redhat.com>
Mon, 19 Oct 2015 18:53:49 +0000 (14:53 -0400)
committerSage Weil <sage@redhat.com>
Mon, 19 Oct 2015 19:05:49 +0000 (15:05 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PGBackend.h
src/osd/ReplicatedBackend.cc

index 52599942b439d0fba2c90c2bf89f364d25ed5b1b..fd341434507566e08bc37f911b5748ef81e8f871 100644 (file)
        const hobject_t &hoid,         ///< [in] object to write
        map<string, bufferlist> &keys  ///< [in] omap keys, may be cleared
        ) { assert(0); }
+     virtual void omap_setkeys(
+       const hobject_t &hoid,         ///< [in] object to write
+       bufferlist &keys_bl  ///< [in] omap keys, may be cleared
+       ) { assert(0); }
      virtual void omap_rmkeys(
        const hobject_t &hoid,         ///< [in] object to write
        set<string> &keys              ///< [in] omap keys, may be cleared
        ) { assert(0); }
+     virtual void omap_rmkeys(
+       const hobject_t &hoid,         ///< [in] object to write
+       bufferlist &keys_bl            ///< [in] omap keys, may be cleared
+       ) { assert(0); }
      virtual void omap_clear(
        const hobject_t &hoid          ///< [in] object to clear omap
        ) { assert(0); }
index 824ce461d93766d022eb8365491853a4b8b76b48..9e7c44238186bbc18916509820651e60161bbdbb 100644 (file)
@@ -398,12 +398,25 @@ public:
       written += p->first.length() + p->second.length();
     return t->omap_setkeys(get_coll(hoid), ghobject_t(hoid), keys);
   }
+  void omap_setkeys(
+    const hobject_t &hoid,
+    bufferlist &keys_bl
+    ) {
+    written += keys_bl.length();
+    return t->omap_setkeys(get_coll(hoid), ghobject_t(hoid), keys_bl);
+  }
   void omap_rmkeys(
     const hobject_t &hoid,
     set<string> &keys
     ) {
     t->omap_rmkeys(get_coll(hoid), ghobject_t(hoid), keys);
   }
+  void omap_rmkeys(
+    const hobject_t &hoid,
+    bufferlist &keys_bl
+    ) {
+    t->omap_rmkeys(get_coll(hoid), ghobject_t(hoid), keys_bl);
+  }
   void omap_clear(
     const hobject_t &hoid
     ) {