mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
Merge pull request #25166 from kungf/journal_remove_full
journal: allow remove set when jounal pool is full Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
commit
241896c660
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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()),
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user