From: Paul Emmerich Date: Thu, 26 Jul 2018 19:24:38 +0000 (+0200) Subject: os/bluestore: handle spurious read errors X-Git-Tag: v14.0.1~308^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cffcbc73aaaa874829d5fc9091af3042b887f9a7;p=ceph-ci.git os/bluestore: handle spurious read errors Some kernels (4.9+) sometime fail to return data when reading from a block device under memory pressure. This patch retries the read if the checksum verification fails, tests show that the first retried read succeeds in ~99.5% of the cases, so 3 attempts are made by default before giving up on the data. Works-around: http://tracker.ceph.com/issues/22464 Signed-off-by: Paul Emmerich --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 4da595dc3e9..0d0ffac66d9 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -975,6 +975,7 @@ 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_csum_type, OPT_STR) // none|xxhash32|xxhash64|crc32c|crc32c_16|crc32c_8 +OPTION(bluestore_retry_disk_reads, OPT_U64) OPTION(bluestore_min_alloc_size, OPT_U32) OPTION(bluestore_min_alloc_size_hdd, OPT_U32) OPTION(bluestore_min_alloc_size_ssd, OPT_U32) @@ -1069,6 +1070,7 @@ OPTION(bluestore_debug_permit_any_bdev_label, OPT_BOOL) OPTION(bluestore_shard_finishers, OPT_BOOL) OPTION(bluestore_debug_random_read_err, OPT_DOUBLE) OPTION(bluestore_debug_inject_bug21040, OPT_BOOL) +OPTION(bluestore_debug_inject_csum_err_probability, OPT_FLOAT) OPTION(kstore_max_ops, OPT_U64) OPTION(kstore_max_bytes, OPT_U64) diff --git a/src/common/options.cc b/src/common/options.cc index 7973c63719e..db343a94ebb 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3965,6 +3965,13 @@ std::vector