{ "max_size", "1048576", 0 },
{ "alignment", "16", 0 },
{ "bluestore_min_alloc_size", "65536", 0 },
- { "bluestore_csum", "true", 0 },
{ "bluestore_csum_type", "crc32c", "crc32c_16", "crc32c_8", "xxhash32",
- "xxhash64", 0 },
+ "xxhash64", "none", 0 },
{ 0 },
};
do_matrix(m, store);
{ "alignment", "512", 0 },
{ "bluestore_min_alloc_size", "32768", "4096", 0 },
{ "bluestore_compression", "force", "none", 0},
- { "bluestore_csum", "true", 0 },
{ "bluestore_csum_type", "crc32c", 0 },
{ "bluestore_default_buffered_read", "true", "false", 0 },
{ 0 },
{ "alignment", "512", 0 },
{ "bluestore_min_alloc_size", "65536", "4096", 0 },
{ "bluestore_compression", "force", "none", 0},
- { "bluestore_csum", "false", 0 },
+ { "bluestore_csum_type", "none", 0},
{ "bluestore_default_buffered_read", "true", "false", 0 },
{ 0 },
};
TEST_P(StoreTest, BluestoreOnOffCSumTest) {
if (string(GetParam()) != "bluestore")
return;
- g_conf->set_val("bluestore_csum", "true");
g_conf->set_val("bluestore_csum_type", "crc32c");
g_conf->apply_changes(NULL);
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
- g_conf->set_val("bluestore_csum", "false");
- g_conf->set_val("bluestore_csum_type", "crc32c");
+ g_conf->set_val("bluestore_csum_type", "none");
g_conf->apply_changes(NULL);
bufferlist in;
}
{
//write with csum disabled followed by read with csum enabled
- g_conf->set_val("bluestore_csum", "false");
- g_conf->set_val("bluestore_csum_type", "crc32c");
- g_conf->apply_changes(NULL);
size_t block_size = 64*1024;
ObjectStore::Transaction t;
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
- g_conf->set_val("bluestore_csum", "true");
g_conf->set_val("bluestore_csum_type", "crc32c");
g_conf->apply_changes(NULL);
}
{
//'mixed' non-overlapping writes to the same blob
- g_conf->set_val("bluestore_csum", "true");
- g_conf->set_val("bluestore_csum_type", "crc32c");
- g_conf->apply_changes(NULL);
ObjectStore::Transaction t;
bufferlist bl, orig;
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
- g_conf->set_val("bluestore_csum", "false");
- g_conf->set_val("bluestore_csum_type", "crc32c");
+ g_conf->set_val("bluestore_csum_type", "none");
g_conf->apply_changes(NULL);
ObjectStore::Transaction t2;
ASSERT_EQ((int)block_size, r);
ASSERT_TRUE(bl_eq(orig, in));
- g_conf->set_val("bluestore_csum", "true");
g_conf->set_val("bluestore_csum_type", "crc32c");
g_conf->apply_changes(NULL);
in.clear();
}
{
//partially blob overwrite under a different csum enablement mode
- g_conf->set_val("bluestore_csum", "true");
- g_conf->set_val("bluestore_csum_type", "crc32c");
- g_conf->apply_changes(NULL);
ObjectStore::Transaction t;
bufferlist bl, orig, orig2;
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
- g_conf->set_val("bluestore_csum", "false");
- g_conf->set_val("bluestore_csum_type", "crc32c");
+ g_conf->set_val("bluestore_csum_type", "none");
g_conf->apply_changes(NULL);
ObjectStore::Transaction t2;
ASSERT_EQ((int)block_size, r);
ASSERT_TRUE(bl_eq(orig2, in));
- g_conf->set_val("bluestore_csum", "true");
g_conf->set_val("bluestore_csum_type", "crc32c");
g_conf->apply_changes(NULL);
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
}
- g_conf->set_val("bluestore_csum", "true");
- g_conf->set_val("bluestore_csum_type", "crc32c");
- g_conf->apply_changes(NULL);
}
INSTANTIATE_TEST_CASE_P(
TEST_P(StoreTest, Many4KWritesNoCSumTest) {
if (string(GetParam()) != "bluestore")
return;
- g_conf->set_val("bluestore_csum", "false");
g_conf->set_val("bluestore_csum_type", "none");
g_ceph_context->_conf->apply_changes(NULL);
store_statfs_t res_stat;
ASSERT_LE(res_stat.stored, max_object);
ASSERT_EQ(res_stat.allocated, max_object);
- g_conf->set_val("bluestore_csum", "true");
g_conf->set_val("bluestore_csum_type", "crc32c");
}