]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "Revert "rgw: if extra data pool name is empty, use data pool name instead""
authorSage Weil <sage@redhat.com>
Mon, 14 Jul 2014 22:00:30 +0000 (15:00 -0700)
committerSage Weil <sage@redhat.com>
Mon, 14 Jul 2014 22:00:30 +0000 (15:00 -0700)
This reverts commit 0b6bd2545925b5e8a80d41de1fda13ffe9d30e2b.

We confused commit 5fd8b0d1639c67e355f0fc0d7e6d7036618d87a1 with commit
b1a4a7cb91e164d1f8af8ce9319e3b3c1949858d in our tests.  We tested without
the latter, saw a failure, applied it and then reverted the former, and it
passed, but didn't actually resolve the problem.

This puts them both back in place and all should be well.

Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index 30335c4ad7c044c7fb6fa534bc953ea45f02726a..be8248e9f1b8b33f9235956d54f3ee7ecb1c666b 100644 (file)
@@ -1693,7 +1693,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;