From 82f8d822da9af1a054069a79bbe6ac89370c438c Mon Sep 17 00:00:00 2001 From: Dongsheng Yang Date: Mon, 6 Feb 2017 19:23:42 +0800 Subject: [PATCH] rbd: add a aio_remove() in objectMap Signed-off-by: Dongsheng Yang --- src/librbd/ObjectMap.cc | 6 ++++++ src/librbd/ObjectMap.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/librbd/ObjectMap.cc b/src/librbd/ObjectMap.cc index 9c0051d54487d..27d7c1f6d18cb 100644 --- a/src/librbd/ObjectMap.cc +++ b/src/librbd/ObjectMap.cc @@ -48,6 +48,12 @@ int ObjectMap::remove(librados::IoCtx &io_ctx, const std::string &image_id) { return io_ctx.remove(object_map_name(image_id, CEPH_NOSNAP)); } +template +int ObjectMap::aio_remove(librados::IoCtx &io_ctx, const std::string &image_id, + librados::AioCompletion *c) { + return io_ctx.aio_remove(object_map_name(image_id, CEPH_NOSNAP), c); +} + template std::string ObjectMap::object_map_name(const std::string &image_id, uint64_t snap_id) { diff --git a/src/librbd/ObjectMap.h b/src/librbd/ObjectMap.h index a3d5ea74e5396..bb7a973cbe1a2 100644 --- a/src/librbd/ObjectMap.h +++ b/src/librbd/ObjectMap.h @@ -34,6 +34,7 @@ public: ~ObjectMap(); static int remove(librados::IoCtx &io_ctx, const std::string &image_id); + static int aio_remove(librados::IoCtx &io_ctx, const std::string &image_id, librados::AioCompletion *c); static std::string object_map_name(const std::string &image_id, uint64_t snap_id); -- 2.39.5