From 753f2b2fce449dc08c877949315d0c7f8b004dd9 Mon Sep 17 00:00:00 2001 From: Dongdong Tao Date: Sat, 29 Jun 2019 17:03:59 +0800 Subject: [PATCH] rgw: fix drain handles error when deleting bucket with bypass-gc option Fixes: https://tracker.ceph.com/issues/40587 Signed-off-by: dongdong tao (cherry picked from commit bcdd7e6341666bf10b97eaacd6b5e53c69ade023) --- src/rgw/rgw_bucket.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index e1dd5832e6d..d5f77cbf08c 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -694,7 +694,7 @@ int rgw_remove_bucket_bypass_gc(RGWRados *store, rgw_bucket& bucket, for (; miter != manifest.obj_end() && max_aio--; ++miter) { if (!max_aio) { ret = drain_handles(handles); - if (ret < 0) { + if (ret < 0 && ret != -ENOENT) { lderr(store->ctx()) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl; return ret; } @@ -723,7 +723,7 @@ int rgw_remove_bucket_bypass_gc(RGWRados *store, rgw_bucket& bucket, if (!max_aio) { ret = drain_handles(handles); - if (ret < 0) { + if (ret < 0 && ret != -ENOENT) { lderr(store->ctx()) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl; return ret; } @@ -733,7 +733,7 @@ int rgw_remove_bucket_bypass_gc(RGWRados *store, rgw_bucket& bucket, } ret = drain_handles(handles); - if (ret < 0) { + if (ret < 0 && ret != -ENOENT) { lderr(store->ctx()) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl; return ret; } -- 2.47.3