From: Sage Weil Date: Mon, 30 Jan 2012 22:27:24 +0000 (-0800) Subject: osd: disable clone overlap for push/pull X-Git-Tag: v0.44~110 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2116f012eddfe3278fcdfeb5a2ddc877491d210d;p=ceph.git 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 --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 4ea9207f1c1d..2b29f7358b88 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 95c6bfe1df3b..ddab37feb24b 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& data_subset, map >& 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;