]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: instantiate a Checksummer
authorSage Weil <sage@redhat.com>
Tue, 10 May 2016 00:34:26 +0000 (20:34 -0400)
committerSage Weil <sage@redhat.com>
Wed, 1 Jun 2016 15:38:45 +0000 (11:38 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index 142d456fe28725592e39fe72b752be13293e0a40..a3ee4647d858710c2604fb027a0b86d9b1538ff8 100644 (file)
@@ -949,6 +949,10 @@ OPTION(bluestore_block_wal_path, OPT_STR, "")
 OPTION(bluestore_block_wal_size, OPT_U64, 96 * 1024*1024) // rocksdb wal
 OPTION(bluestore_block_wal_create, OPT_BOOL, false)
 OPTION(bluestore_block_preallocate_file, OPT_BOOL, false) //whether preallocate space if block/db_path/wal_path is file rather that block device.
+OPTION(bluestore_csum, OPT_BOOL, true)
+OPTION(bluestore_csum_type, OPT_STR, "crc32c")
+OPTION(bluestore_min_csum_block, OPT_U32, 4096)
+OPTION(bluestore_max_csum_block, OPT_U32, 64*1024)
 OPTION(bluestore_min_alloc_size, OPT_U32, 64*1024)
 OPTION(bluestore_onode_map_size, OPT_U32, 1024)   // onodes per collection
 OPTION(bluestore_cache_tails, OPT_BOOL, true)   // cache tail blocks in Onode
index 139c42d152e02ae6d2fde69b4b8fcabf1d78f751..b59d2411a738b41c36408ae75426b61397c0e567 100644 (file)
@@ -769,7 +769,8 @@ BlueStore::BlueStore(CephContext *cct, const string& path)
     finisher(cct),
     kv_sync_thread(this),
     kv_stop(false),
-    logger(NULL)
+    logger(NULL),
+    checksummer(new Checksummer)
 {
   _init_logger();
 }
@@ -781,6 +782,7 @@ BlueStore::~BlueStore()
   assert(db == NULL);
   assert(bluefs == NULL);
   assert(fsid_fd < 0);
+  delete checksummer;
 }
 
 void BlueStore::_init_logger()
index e28e103ceaeb485d92338e5541e5f2e64e0acadb..5a827d4084ecaa7c5d84bc404aa7bba5339ab0e7 100644 (file)
@@ -38,6 +38,7 @@
 class Allocator;
 class FreelistManager;
 class BlueFS;
+class Checksummer;
 
 enum {
   l_bluestore_first = 732430,
@@ -584,6 +585,7 @@ private:
   std::mutex reap_lock;
   list<CollectionRef> removed_collections;
 
+  Checksummer *checksummer;
 
   // --------------------------------------------------------
   // private methods