]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: if extra data pool name is empty, use data pool name instead 1907/head
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 30 May 2014 21:47:25 +0000 (14:47 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 30 May 2014 21:49:23 +0000 (14:49 -0700)
Fixes: #8311
An empty pool name could be used as the extra data pool.

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

index ecf210d677b162da32ac54347a5dfaddeb79fa00..b1025e2fd5cce3a79440726fea06201cd0aa787f 100644 (file)
@@ -1688,7 +1688,8 @@ int RGWRados::open_bucket_data_ctx(rgw_bucket& bucket, librados::IoCtx& data_ctx
 
 int RGWRados::open_bucket_data_extra_ctx(rgw_bucket& bucket, librados::IoCtx& data_ctx)
 {
-  int r = open_bucket_pool_ctx(bucket.name, bucket.data_extra_pool, data_ctx);
+  string& pool = (!bucket.data_extra_pool.empty() ? bucket.data_extra_pool : bucket.data_pool);
+  int r = open_bucket_pool_ctx(bucket.name, pool, data_ctx);
   if (r < 0)
     return r;