summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2012-01-30 14:27:24 -0800
committerSage Weil <sage@newdream.net>2012-01-30 14:27:24 -0800
commit2116f012eddfe3278fcdfeb5a2ddc877491d210d (patch)
tree72f47235f635b2002f36786b48b34f41f97f252d
parent9d246a4362867ea3e5596baa661f268fa4bc4217 (diff)
downloadceph-2116f012eddfe3278fcdfeb5a2ddc877491d210d.tar.gz
osd: disable clone overlap for push/pull
There is a bug in the push/pull code. Disable the recovery smarts by default until we fix #2002. There is currently a race (in the callers) where: - an adjacent clone is missing - we (calculate some clone overlap? and) start pulling - we get adjacent clone - we get push, calc a different overlap, and then get confused. Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--src/common/config_opts.h1
-rw-r--r--src/osd/ReplicatedPG.cc5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index 4ea9207f1c1..2b29f7358b8 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -254,6 +254,7 @@ OPTION(osd_map_message_max, OPT_INT, 100) // max maps per MOSDMap message
OPTION(osd_op_threads, OPT_INT, 2) // 0 == no threading
OPTION(osd_disk_threads, OPT_INT, 1)
OPTION(osd_recovery_threads, OPT_INT, 1)
+OPTION(osd_recover_clone_overlap, OPT_BOOL, false) // preserve clone_overlap during recovery/migration
OPTION(osd_backfill_scan_min, OPT_INT, 64)
OPTION(osd_backfill_scan_max, OPT_INT, 512)
OPTION(osd_op_thread_timeout, OPT_INT, 30)
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 95c6bfe1df3..ddab37feb24 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -3809,6 +3809,11 @@ void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const hobject_t& soid,
interval_set<uint64_t>& data_subset,
map<hobject_t, interval_set<uint64_t> >& clone_subsets)
{
+ if (!g_conf->osd_recover_clone_overlap) {
+ dout(10) << "calc_clone_subsets " << soid << " -- osd_recover_clone_overlap disabled" << dendl;
+ return;
+ }
+
dout(10) << "calc_clone_subsets " << soid
<< " clone_overlap " << snapset.clone_overlap << dendl;