From: Casey Bodley Date: Thu, 18 May 2017 18:55:51 +0000 (-0400) Subject: os: add bufferlist overload for omap_rmkeyrange() X-Git-Tag: v15.1.0~1792^2~16 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2bdb298edad2dff5cb330757f92e469179842d12;p=ceph-ci.git os: add bufferlist overload for omap_rmkeyrange() Signed-off-by: Casey Bodley --- diff --git a/src/os/Transaction.h b/src/os/Transaction.h index 20d554819c2..2ca7bacd171 100644 --- a/src/os/Transaction.h +++ b/src/os/Transaction.h @@ -1140,15 +1140,29 @@ public: const std::string& first, ///< [in] first key in range const std::string& last ///< [in] first key past range, range is [first,last) ) { - using ceph::encode; - Op* _op = _get_next_op(); - _op->op = OP_OMAP_RMKEYRANGE; - _op->cid = _get_coll_id(cid); - _op->oid = _get_object_id(oid); - encode(first, data_bl); - encode(last, data_bl); - data.ops++; - } + using ceph::encode; + Op* _op = _get_next_op(); + _op->op = OP_OMAP_RMKEYRANGE; + _op->cid = _get_coll_id(cid); + _op->oid = _get_object_id(oid); + encode(first, data_bl); + encode(last, data_bl); + data.ops++; + } + + /// Remove key range from oid omap + void omap_rmkeyrange( + const coll_t cid, ///< [in] Collection containing oid + const ghobject_t &oid, ///< [in] Object from which to remove the omap keys + const bufferlist &keys_bl ///< [in] range of keys to clear + ) { + Op* _op = _get_next_op(); + _op->op = OP_OMAP_RMKEYRANGE; + _op->cid = _get_coll_id(cid); + _op->oid = _get_object_id(oid); + data_bl.append(keys_bl); + data.ops++; + } /// Set omap header void omap_setheader(