]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/newstore: fix collection range for temp objects
authorSage Weil <sage@redhat.com>
Tue, 18 Aug 2015 18:57:47 +0000 (14:57 -0400)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:43 +0000 (13:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/newstore/NewStore.cc

index 1b3790f9ca200c95a4585951fc565d0e14700d8e..a198d2ae103f2866e9ab46bf1f9c997b44ae27d6 100644 (file)
@@ -154,7 +154,7 @@ static void get_coll_key_range(const coll_t& cid, int bits,
             (unsigned)hobject_t::_reverse_bits(pgid.ps()));
     start->append(buf);
     snprintf(buf, sizeof(buf), ".%016llx.%08x.",
-            (unsigned long long)((-1ll - pgid.pool()) + 0x8000000000000000ull),
+            (unsigned long long)((-2ll - pgid.pool()) + 0x8000000000000000ull),
             (unsigned)hobject_t::_reverse_bits(pgid.ps()));
     temp_start->append(buf);
 
@@ -165,7 +165,7 @@ static void get_coll_key_range(const coll_t& cid, int bits,
               (unsigned long long)(pgid.pool() + 0x8000000000000000ull));
       end->append(buf);
       snprintf(buf, sizeof(buf), ".%016llx.gggggggg.",
-              (unsigned long long)((-1ll - pgid.pool()) + 0x8000000000000000ull));
+              (unsigned long long)((-2ll - pgid.pool()) + 0x8000000000000000ull));
       temp_end->append(buf);
     } else {
       snprintf(buf, sizeof(buf), ".%016llx.%08x.",
@@ -173,7 +173,7 @@ static void get_coll_key_range(const coll_t& cid, int bits,
               (unsigned)end_hash);
       end->append(buf);
       snprintf(buf, sizeof(buf), ".%016llx.%08x.",
-              (unsigned long long)((-1ll - pgid.pool()) + 0x8000000000000000ull),
+              (unsigned long long)((-2ll - pgid.pool()) + 0x8000000000000000ull),
               (unsigned)end_hash);
       temp_end->append(buf);
     }