From: Greg Farnum Date: Fri, 12 Feb 2010 22:54:56 +0000 (-0800) Subject: rgw: actually delete pools when using rados! X-Git-Tag: v0.19~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=12e3742fe8fb0e09bdc904bc9514879af8fed370;p=ceph.git rgw: actually delete pools when using rados! --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index f94d2ab06216..19bd087dde3e 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; }