]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix black of resharding 11597/head
authorIgor Fedotov <ifedotov@mirantis.com>
Fri, 21 Oct 2016 16:30:36 +0000 (16:30 +0000)
committerIgor Fedotov <ifedotov@mirantis.com>
Fri, 21 Oct 2016 16:35:34 +0000 (16:35 +0000)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/os/bluestore/BlueStore.cc

index e1fd1f8b32113814b6d47a9536f74b0c65e2e4a4..a8be8d10f1019a3ce6e3cc5cbdfd32417bec6203 100644 (file)
@@ -1503,14 +1503,12 @@ bool BlueStore::ExtentMap::update(Onode *o, KeyValueDB::Transaction t,
   if (o->onode.extent_map_shards.empty()) {
     if (inline_bl.length() == 0) {
       unsigned n;
-      if (encode_some(0, OBJECT_MAX_SIZE, inline_bl, &n)) {
-       return true;
-      }
+      bool never_happen = encode_some(0, OBJECT_MAX_SIZE, inline_bl, &n); //we need to encode inline_bl to measure encoded length
+      assert(!never_happen);
       size_t len = inline_bl.length();
       dout(20) << __func__ << " inline shard "
               << len << " bytes from " << n << " extents" << dendl;
       if (!force && len > g_conf->bluestore_extent_map_shard_max_size) {
-        inline_bl.clear();
        return true;
       }
     }