]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix drain handles error when deleting bucket with bypass-gc option 30198/head
authorDongdong Tao <dongdong.tao@canonical.com>
Sat, 29 Jun 2019 09:03:59 +0000 (17:03 +0800)
committerDongdong Tao <dongdong.tao@canonical.com>
Fri, 6 Sep 2019 03:59:03 +0000 (03:59 +0000)
Fixes: https://tracker.ceph.com/issues/41111
Signed-off-by: dongdong tao <dongdong.tao@canonical.com>
(cherry picked from commit bcdd7e6341666bf10b97eaacd6b5e53c69ade023)

src/rgw/rgw_bucket.cc

index 3204acd4ca0937d2b59b63265cb5f25382ee218a..86d6193513fd27d4cf17ad0b2f7f2aa8485a5eda 100644 (file)
@@ -690,7 +690,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;
             }
@@ -719,7 +719,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;
         }
@@ -729,7 +729,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;
   }