From: Sage Weil Date: Mon, 13 Jan 2020 13:51:56 +0000 (-0600) Subject: os/Transaction: add omap_rmkey X-Git-Tag: v15.1.0~219^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=330e3608eae47f9413a2417da318c31ec6e4ef22;p=ceph.git os/Transaction: add omap_rmkey Signed-off-by: Sage Weil --- diff --git a/src/os/Transaction.h b/src/os/Transaction.h index f74f19d2c8b7..3b8eb1bb2f54 100644 --- a/src/os/Transaction.h +++ b/src/os/Transaction.h @@ -1119,6 +1119,22 @@ public: data.ops = data.ops + 1; } + /// Remove key from oid omap + void omap_rmkey( + const coll_t &cid, ///< [in] Collection containing oid + const ghobject_t &oid, ///< [in] Object from which to remove the omap + const std::string& key ///< [in] Keys to clear + ) { + Op* _op = _get_next_op(); + _op->op = OP_OMAP_RMKEYS; + _op->cid = _get_coll_id(cid); + _op->oid = _get_object_id(oid); + using ceph::encode; + encode((uint32_t)1, data_bl); + encode(key, data_bl); + data.ops = data.ops + 1; + } + /// Remove keys from oid omap void omap_rmkeys( const coll_t &cid, ///< [in] Collection containing oid