summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Farnum <gregf@hq.newdream.net>2010-02-12 23:54:56 +0100
committerGreg Farnum <gregf@hq.newdream.net>2010-02-16 23:34:44 +0100
commit12e3742fe8fb0e09bdc904bc9514879af8fed370 (patch)
tree46f46e05f76f317b032001adaf5e6f5b91eb03e7
parentrados/objecter: can now delete pools! (diff)
downloadceph-12e3742fe8fb0e09bdc904bc9514879af8fed370.tar.xz
ceph-12e3742fe8fb0e09bdc904bc9514879af8fed370.zip
rgw: actually delete pools when using rados!
-rw-r--r--src/rgw/rgw_rados.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index f94d2ab0621..19bd087dde3 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -274,15 +274,13 @@ int RGWRados::copy_obj(std::string& id, std::string& dest_bucket, std::string& d
int RGWRados::delete_bucket(std::string& id, std::string& bucket)
{
- /* TODO! */
-#if 0
- int len = strlen(DIR_NAME) + 1 + bucket.size() + 1;
- char buf[len];
- snprintf(buf, len, "%s/%s", DIR_NAME, bucket.c_str());
-
- if (rmdir(buf) < 0)
- return -errno;
-#endif
+ rados_pool_t pool;
+
+ int r = open_pool(bucket, &pool);
+ if (r < 0) return r;
+
+ r = rados->delete_pool(pool);
+ if (r < 0) return r;
return 0;
}