]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge remote-tracking branch 'gh/next'
authorSage Weil <sage@redhat.com>
Tue, 29 Jul 2014 18:16:24 +0000 (11:16 -0700)
committerSage Weil <sage@redhat.com>
Tue, 29 Jul 2014 18:16:24 +0000 (11:16 -0700)
1  2 
src/test/librados/tier.cc

index 897eef9e294cabc4dc60b3ba4a9a16a9c85747c9,c740961e1debfe9572e096a5c7422201a1e1527e..953a765c0082d5f95ec2b85c7d1147411a9f5716
@@@ -2064,13 -2045,15 +2064,15 @@@ TEST_F(LibRadosTwoPoolsPP, HitSetWrite
    // wait for maps to settle
    cluster.wait_for_latest_osdmap();
  
 -  ioctx.set_namespace("");
 +  cache_ioctx.set_namespace("");
  
+   int num = 200;
    // do a bunch of writes
-   for (int i=0; i<1000; ++i) {
+   for (int i=0; i<num; ++i) {
      bufferlist bl;
      bl.append("a");
 -    ASSERT_EQ(0, ioctx.write(stringify(i), bl, 1, 0));
 +    ASSERT_EQ(0, cache_ioctx.write(stringify(i), bl, 1, 0));
    }
  
    // get HitSets
  
      // cope with racing splits by refreshing pg_num
      if (i == num_pg - 1)
 -      num_pg = _get_pg_num(cluster, pool_name);
 +      num_pg = _get_pg_num(cluster, cache_pool_name);
    }
  
-   for (int i=0; i<1000; ++i) {
+   for (int i=0; i<num; ++i) {
      string n = stringify(i);
 -    uint32_t hash = ioctx.get_object_hash_position(n);
 +    uint32_t hash = cache_ioctx.get_object_hash_position(n);
      hobject_t oid(sobject_t(n, CEPH_NOSNAP), "", hash,
 -                cluster.pool_lookup(pool_name.c_str()), "");
 +                cluster.pool_lookup(cache_pool_name.c_str()), "");
      std::cout << "checking for " << oid << std::endl;
      bool found = false;
      for (int p=0; p<num_pg; ++p) {