rgw: actually delete pools when using rados!

This commit is contained in:
Greg Farnum 2010-02-12 14:54:56 -08:00
parent 9851a2020d
commit 12e3742fe8

View File

@ -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());
rados_pool_t pool;
if (rmdir(buf) < 0)
return -errno;
#endif
int r = open_pool(bucket, &pool);
if (r < 0) return r;
r = rados->delete_pool(pool);
if (r < 0) return r;
return 0;
}