}
}
+TEST_P(StoreTestSpecificAUSize, ManyManyExtents2) {
+
+ if (string(GetParam()) != "bluestore")
+ return;
+
+ size_t block_size = 4096;
+ StartDeferred(block_size);
+
+ int r;
+ coll_t cid;
+ ghobject_t hoid(hobject_t("test", "", CEPH_NOSNAP, 0, -1, ""));
+
+ auto ch = store->create_new_collection(cid);
+ {
+ ObjectStore::Transaction t;
+ t.create_collection(cid, 0);
+ r = queue_transaction(store, ch, std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ {
+ ObjectStore::Transaction t;
+ bufferlist bl;
+ bl.append(std::string(1024 * 1024, 'a'));
+ t.write(cid, hoid, 0, bl.length(), bl, 0);
+ r = queue_transaction(store, ch, std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ ch.reset();
+ store->umount();
+ store->mount();
+ ch = store->open_collection(cid);
+ {
+ cerr << "reading in multiple chunks..." << std::endl;
+ bufferlist bl;
+ interval_set<uint64_t> im;
+ for (int i=0; i < 100000;i++) {
+ im.insert(i * 2, 1);
+ }
+ r = store->readv(ch, hoid, im, bl, 0);
+ ASSERT_EQ(r, 100000);
+ ASSERT_EQ(r, bl.length());
+ }
+ store->refresh_perf_counters();
+ {
+ ObjectStore::Transaction t;
+ t.remove(cid, hoid);
+ t.remove_collection(cid);
+ cerr << "Cleaning" << std::endl;
+ r = queue_transaction(store, ch, std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+}
+
TEST_P(StoreTestSpecificAUSize, ZeroBlockDetectionSmallAppend) {
CephContext *cct = (new CephContext(CEPH_ENTITY_TYPE_CLIENT))->get();
if (string(GetParam()) != "bluestore" || !cct->_conf->bluestore_zero_block_detection) {