]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/seastore: fix test_seastore
authorchunmei-liu <chunmei.liu@intel.com>
Fri, 8 Jul 2022 08:52:09 +0000 (01:52 -0700)
committerchunmei-liu <chunmei.liu@intel.com>
Fri, 22 Jul 2022 23:12:23 +0000 (16:12 -0700)
collection default has pool(0), and NO_SHARD,
so the ghobject_t should have the same setting.
and ghobject_t default hash not within 1<<(32-4),
so set collection bits to be 0.

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
src/test/crimson/seastore/test_seastore.cc

index 514b19c6a477f87950f3bc28faea623f4b4793b8..be730e7ec6bbf8699f78b06c9ab96c34f0fb74d7 100644 (file)
@@ -42,7 +42,7 @@ struct seastore_test_t :
     }).then([this](auto coll_ref) {
       coll = coll_ref;
       CTransaction t;
-      t.create_collection(coll_name, 4);
+      t.create_collection(coll_name, 0);
       return seastore->do_transaction(
        coll,
        std::move(t));
@@ -423,8 +423,9 @@ ghobject_t make_oid(int i) {
   auto ret = ghobject_t(
     hobject_t(
       sobject_t(ss.str(), CEPH_NOSNAP)));
-  ret.set_shard(shard_id_t(0));
+  ret.set_shard(shard_id_t(shard_id_t::NO_SHARD));
   ret.hobj.nspace = "asdf";
+  ret.hobj.pool = 0;
   return ret;
 }