From: Igor Fedotov Date: Fri, 21 Oct 2016 16:30:36 +0000 (+0000) Subject: os/bluestore: fix black of resharding X-Git-Tag: v11.1.0~547^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=059cc40b9d3acf97430a70d17b91708b8483738e;p=ceph.git os/bluestore: fix black of resharding Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index e1fd1f8b3211..a8be8d10f101 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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; } }