]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: disable clone overlap for push/pull
authorSage Weil <sage@newdream.net>
Mon, 30 Jan 2012 22:27:24 +0000 (14:27 -0800)
committerSage Weil <sage@newdream.net>
Mon, 30 Jan 2012 22:27:24 +0000 (14:27 -0800)
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>
src/common/config_opts.h
src/osd/ReplicatedPG.cc

index 4ea9207f1c1db6202795cfbc82794f3b5a4215f9..2b29f7358b886b996b716aeb558eb3b35c77530e 100644 (file)
@@ -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)
index 95c6bfe1df3b3e3a579227dc16439a33c16b53a2..ddab37feb24bb1dbd89d984e25a7c1638f4237a6 100644 (file)
@@ -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;