]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_rados: remove unused ioctx for domain root in create_bucket 9098/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Thu, 12 May 2016 14:09:23 +0000 (16:09 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 12 May 2016 14:09:23 +0000 (16:09 +0200)
In `create_bucket`, we open an ioctx for domain root pool and never use
it later, removing this.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_rados.cc

index 7121045c3647683875fe922f5f1b350c98e24038..feb1d99655c9ea41cfc09d53800341a5bc6ff0f6 100644 (file)
@@ -5004,14 +5004,6 @@ int RGWRados::create_bucket(RGWUserInfo& owner, rgw_bucket& bucket,
     uint32_t nop = 0;
     ::encode(nop, bl);
 
-    const string& pool = get_zone_params().domain_root.name;
-    const char *pool_str = pool.c_str();
-    librados::IoCtx id_io_ctx;
-    librados::Rados *rad = get_rados_handle();
-    int r = rad->ioctx_create(pool_str, id_io_ctx);
-    if (r < 0)
-      return r;
-
     if (!pmaster_bucket) {
       uint64_t iid = instance_id();
       uint64_t bid = next_bucket_id();
@@ -5024,7 +5016,7 @@ int RGWRados::create_bucket(RGWUserInfo& owner, rgw_bucket& bucket,
       bucket.bucket_id = pmaster_bucket->bucket_id;
     }
 
-    r = init_bucket_index(bucket, bucket_index_max_shards);
+    int r = init_bucket_index(bucket, bucket_index_max_shards);
     if (r < 0)
       return r;