From: Sebastien Ponce Date: Fri, 22 Jan 2016 11:26:22 +0000 (+0100) Subject: rados : added an aio_remove version taking flags X-Git-Tag: v11.1.0~355^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=154025b3a719837c23768636c5201e876bc9663d;p=ceph.git rados : added an aio_remove version taking flags The synchronous remove exists in both versions, with and without flags, but the asynchronous one did not. I've only fixed this disymetry Signed-off-by: Sebastien Ponce --- diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp index bb7f2b9e59d..f4ab24dbc2e 100644 --- a/src/include/rados/librados.hpp +++ b/src/include/rados/librados.hpp @@ -950,6 +950,7 @@ namespace librados * other than SNAP_HEAD */ int aio_remove(const std::string& oid, AioCompletion *c); + int aio_remove(const std::string& oid, AioCompletion *c, int flags); /** * Wait for all currently pending aio writes to be safe. diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc index b5a2d65e42b..cc115a3d2b7 100644 --- a/src/librados/IoCtxImpl.cc +++ b/src/librados/IoCtxImpl.cc @@ -974,7 +974,7 @@ int librados::IoCtxImpl::aio_writesame(const object_t &oid, return 0; } -int librados::IoCtxImpl::aio_remove(const object_t &oid, AioCompletionImpl *c) +int librados::IoCtxImpl::aio_remove(const object_t &oid, AioCompletionImpl *c, int flags) { auto ut = ceph::real_clock::now(client->cct); @@ -990,7 +990,7 @@ int librados::IoCtxImpl::aio_remove(const object_t &oid, AioCompletionImpl *c) Objecter::Op *o = objecter->prepare_remove_op( oid, oloc, - snapc, ut, 0, + snapc, ut, flags, onack, onsafe, &c->objver); objecter->op_submit(o, &c->tid); diff --git a/src/librados/IoCtxImpl.h b/src/librados/IoCtxImpl.h index 19fd0b5b6b7..9e4d4cf0540 100644 --- a/src/librados/IoCtxImpl.h +++ b/src/librados/IoCtxImpl.h @@ -202,7 +202,7 @@ struct librados::IoCtxImpl { const bufferlist& bl); int aio_writesame(const object_t &oid, AioCompletionImpl *c, const bufferlist& bl, size_t write_len, uint64_t off); - int aio_remove(const object_t &oid, AioCompletionImpl *c); + int aio_remove(const object_t &oid, AioCompletionImpl *c, int flags=0); int aio_exec(const object_t& oid, AioCompletionImpl *c, const char *cls, const char *method, bufferlist& inbl, bufferlist *outbl); int aio_stat(const object_t& oid, AioCompletionImpl *c, uint64_t *psize, time_t *pmtime); diff --git a/src/librados/librados.cc b/src/librados/librados.cc index a544474fef7..328f76a3cb6 100644 --- a/src/librados/librados.cc +++ b/src/librados/librados.cc @@ -1840,6 +1840,11 @@ int librados::IoCtx::aio_remove(const std::string& oid, librados::AioCompletion return io_ctx_impl->aio_remove(oid, c->pc); } +int librados::IoCtx::aio_remove(const std::string& oid, librados::AioCompletion *c, int flags) +{ + return io_ctx_impl->aio_remove(oid, c->pc, flags); +} + int librados::IoCtx::aio_flush_async(librados::AioCompletion *c) { io_ctx_impl->flush_aio_writes_async(c->pc);