]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: handle ENOENT when listing bucket metadata entries 438/head
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Jul 2013 01:43:56 +0000 (18:43 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Jul 2013 01:43:56 +0000 (18:43 -0700)
Just return success (with an empty list)

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_bucket.cc

index 23354233c963ec292a65bd6f390eb9d0264dd6bc..aae7d31e21ccc1f1e2f105fb51f707169f6a5a01 100644 (file)
@@ -1476,8 +1476,13 @@ public:
 
     int ret = store->list_raw_objects(store->zone.domain_root, no_filter,
                                       max, info->ctx, unfiltered_keys, truncated);
-    if (ret < 0)
+    if (ret < 0 && ret != -ENOENT)
       return ret;
+    if (ret == -ENOENT) {
+      if (truncated)
+        *truncated = false;
+      return 0;
+    }
 
     // now filter out the system entries
     list<string>::iterator iter;
@@ -1618,8 +1623,13 @@ public:
 
     int ret = store->list_raw_objects(store->zone.domain_root, no_filter,
                                       max, info->ctx, unfiltered_keys, truncated);
-    if (ret < 0)
+    if (ret < 0 && ret != -ENOENT)
       return ret;
+    if (ret == -ENOENT) {
+      if (truncated)
+        *truncated = false;
+      return 0;
+    }
 
     int prefix_size = sizeof(RGW_BUCKET_INSTANCE_MD_PREFIX) - 1;
     // now filter in the relevant entries