]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add bluestore_ignore_data_csum option 26247/head
authorSage Weil <sage@redhat.com>
Thu, 31 Jan 2019 23:33:57 +0000 (17:33 -0600)
committerSage Weil <sage@redhat.com>
Fri, 1 Feb 2019 17:47:55 +0000 (11:47 -0600)
This option just suppresses the EIO errors.  We still get the messages
in the logs, though.  This can be useful when you are in dire straights
and prefer some data to no data.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit b7b78809f1e9790b08a2f5a49de96be1131e5010)

- remove RUNTIME flag in options.cc (not in luminous)
- trivial conflict due to adjacnet ceph_clock_now()

src/common/legacy_config_opts.h
src/common/options.cc
src/os/bluestore/BlueStore.cc

index 38b36a60cc88eec35879c7a0f094acdd5003b12f..f523c4f62db5c8940b7e4a96ecba5642293d5162 100644 (file)
@@ -1026,6 +1026,7 @@ OPTION(bluestore_block_wal_path, OPT_STR)
 OPTION(bluestore_block_wal_size, OPT_U64) // rocksdb wal
 OPTION(bluestore_block_wal_create, OPT_BOOL)
 OPTION(bluestore_block_preallocate_file, OPT_BOOL) //whether preallocate space if block/db_path/wal_path is file rather that block device.
+OPTION(bluestore_ignore_data_csum, OPT_BOOL)
 OPTION(bluestore_csum_type, OPT_STR) // none|xxhash32|xxhash64|crc32c|crc32c_16|crc32c_8
 OPTION(bluestore_csum_min_block, OPT_U32)
 OPTION(bluestore_csum_max_block, OPT_U32)
index 1ed027c9bebd6938ef37b37eeb1f758bdcc50d00..d34387e916bc4d88d6493cb198d97bb61fb603f0 100644 (file)
@@ -3371,6 +3371,10 @@ std::vector<Option> get_global_options() {
     .add_tag("mkfs")
     .set_description("Preallocate file created via bluestore_block*_create"),
 
+    Option("bluestore_ignore_data_csum", Option::TYPE_BOOL, Option::LEVEL_DEV)
+    .set_default(false)
+    .set_description("Ignore checksum errors on read and do not generate an EIO error"),
+
     Option("bluestore_csum_type", Option::TYPE_STR, Option::LEVEL_ADVANCED)
     .set_default("crc32c")
     .set_enum_allowed({"none", "crc32c", "crc32c_16", "crc32c_8", "xxhash32", "xxhash64"})
index 47112cc70abad4933c8a5648a411416d808d09d1..3149eaa16718bbbdca5092e6deb4d1a8a0f8986a 100644 (file)
@@ -6822,6 +6822,9 @@ int BlueStore::_verify_csum(OnodeRef& o,
     }
   }
   logger->tinc(l_bluestore_csum_lat, ceph_clock_now() - start);
+  if (cct->_conf->bluestore_ignore_data_csum) {
+    return 0;
+  }
   return r;
 }