]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: set min_read_recency_for_promote to default 1 when doing upgrade 2444/head
authorZhiqiang Wang <wonzhq@hotmail.com>
Wed, 10 Sep 2014 03:58:32 +0000 (11:58 +0800)
committerZhiqiang Wang <wonzhq@hotmail.com>
Wed, 10 Sep 2014 03:58:32 +0000 (11:58 +0800)
When upgrading from a build without the promotion on 2nd read feature,
should set min_read_recency_for_promote to the default value 1, instead
of 0.

Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
src/osd/osd_types.cc

index 3591355142fc5c051e8eca23fda272b9dc84768d..3306c1a685b5c890f27806e0a7d485fe29e48949 100644 (file)
@@ -1263,8 +1263,7 @@ void pg_pool_t::decode(bufferlist::iterator& bl)
   if (struct_v >= 16) {
     ::decode(min_read_recency_for_promote, bl);
   } else {
-    pg_pool_t def;
-    min_read_recency_for_promote = def.min_read_recency_for_promote;
+    min_read_recency_for_promote = 1;
   }
   if (struct_v >= 17) {
     ::decode(expected_num_objects, bl);