From 1b0335ed66eb4fe9820ab4a6122cbf88d064440e Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 5 Dec 2013 13:57:44 -0800 Subject: [PATCH] common: add option to disable filestore sharded object check Signed-off-by: Samuel Just --- src/common/config_opts.h | 2 ++ src/os/FileStore.cc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index fd3a31409beb1..ad412e43c1472 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -543,6 +543,8 @@ OPTION(osd_objectstore, OPT_STR, "filestore") // ObjectStore backend type // Set to true for testing. Users should NOT set this. OPTION(osd_debug_override_acting_compat, OPT_BOOL, false) +OPTION(filestore_debug_disable_sharded_check, OPT_BOOL, false) + /// filestore wb throttle limits OPTION(filestore_wbthrottle_enable, OPT_BOOL, true) OPTION(filestore_wbthrottle_btrfs_bytes_start_flusher, OPT_U64, 41943040) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 2a79e8bc350d2..64428f15807fa 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -1010,7 +1010,8 @@ void FileStore::set_allow_sharded_objects() bool FileStore::get_allow_sharded_objects() { - return superblock.compat_features.incompat.contains(CEPH_FS_FEATURE_INCOMPAT_SHARDS); + return g_conf->filestore_debug_disable_sharded_check || + superblock.compat_features.incompat.contains(CEPH_FS_FEATURE_INCOMPAT_SHARDS); } int FileStore::update_version_stamp() -- 2.39.5