]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
journal: allow remove set when jounal pool is full 25166/head
authorkungf <yang.wang@easystack.cn>
Tue, 20 Nov 2018 02:29:10 +0000 (10:29 +0800)
committerkungf <yang.wang@easystack.cn>
Fri, 23 Nov 2018 09:40:03 +0000 (17:40 +0800)
Signed-off-by: kungf <yang.wang@easystack.cn>
src/journal/JournalTrimmer.cc
src/test/librados_test_stub/LibradosTestStub.cc
src/test/librados_test_stub/TestIoCtxImpl.h
src/test/librados_test_stub/TestMemIoCtxImpl.cc
src/test/librados_test_stub/TestMemIoCtxImpl.h

index d3289499a090d3ecca0c4db94a5d85f1f143650a..645a62304c5f99a67a29b3106f88b9bd2ecd100a 100644 (file)
@@ -139,7 +139,8 @@ void JournalTrimmer::remove_set(uint64_t object_set) {
     librados::AioCompletion *comp =
       librados::Rados::aio_create_completion(ctx, NULL,
                                              utils::rados_ctx_callback);
-    int r = m_ioctx.aio_remove(oid, comp);
+    int r = m_ioctx.aio_remove(oid, comp,
+                               CEPH_OSD_FLAG_FULL_FORCE | CEPH_OSD_FLAG_FULL_TRY);
     ceph_assert(r == 0);
     comp->release();
   }
index 4ad154bd1dcc5575b62127ca1143c8787805800b..78a290a3ac5e9d45040d45d1441cd080c4dcd5f9 100644 (file)
@@ -475,6 +475,11 @@ int IoCtx::aio_remove(const std::string& oid, AioCompletion *c) {
   return ctx->aio_remove(oid, c->pc);
 }
 
+int IoCtx::aio_remove(const std::string& oid, AioCompletion *c, int flags) {
+  TestIoCtxImpl *ctx = reinterpret_cast<TestIoCtxImpl*>(io_ctx_impl);
+  return ctx->aio_remove(oid, c->pc, flags);
+}
+
 int IoCtx::aio_watch(const std::string& o, AioCompletion *c, uint64_t *handle,
                      librados::WatchCtx2 *watch_ctx) {
   TestIoCtxImpl *ctx = reinterpret_cast<TestIoCtxImpl*>(io_ctx_impl);
index 448575a334df9a0285d5bbca3992011bd4738b29..e92d7dfa505f669f4dfdc89e249bbe99298a9346 100644 (file)
@@ -90,7 +90,8 @@ public:
   virtual int aio_operate_read(const std::string& oid, TestObjectOperationImpl &ops,
                                AioCompletionImpl *c, int flags,
                                bufferlist *pbl);
-  virtual int aio_remove(const std::string& oid, AioCompletionImpl *c) = 0;
+  virtual int aio_remove(const std::string& oid, AioCompletionImpl *c,
+                         int flags = 0) = 0;
   virtual int aio_watch(const std::string& o, AioCompletionImpl *c,
                         uint64_t *handle, librados::WatchCtx2 *ctx);
   virtual int aio_unwatch(uint64_t handle, AioCompletionImpl *c);
index 8b64786add725e99b261e1d5f434cf04588c3d29..9e160015ff066833b67e54a324f9704b7b734406 100644 (file)
@@ -46,7 +46,7 @@ TestIoCtxImpl *TestMemIoCtxImpl::clone() {
   return new TestMemIoCtxImpl(*this);
 }
 
-int TestMemIoCtxImpl::aio_remove(const std::string& oid, AioCompletionImpl *c) {
+int TestMemIoCtxImpl::aio_remove(const std::string& oid, AioCompletionImpl *c, int flags) {
   m_client->add_aio_operation(oid, true,
                               boost::bind(&TestMemIoCtxImpl::remove, this, oid,
                                           get_snap_context()),
index e15eee5613556f217ff4080636a5e7cd21a73ce5..f083230c89ebd04dd372be5c7ea3c31d30b21a9d 100644 (file)
@@ -21,7 +21,7 @@ public:
 
   TestIoCtxImpl *clone() override;
 
-  int aio_remove(const std::string& oid, AioCompletionImpl *c) override;
+  int aio_remove(const std::string& oid, AioCompletionImpl *c, int flags = 0) override;
 
   int append(const std::string& oid, const bufferlist &bl,
              const SnapContext &snapc) override;