From: Sage Weil Date: Tue, 20 Dec 2016 03:15:37 +0000 (-0600) Subject: Merge pull request #12541 from liewegas/wip-bluestore-omap-flush X-Git-Tag: v11.1.1~16 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f674fa24fbd05e88aa501fbe93c7121e55d57f51;p=ceph-ci.git Merge pull request #12541 from liewegas/wip-bluestore-omap-flush os/bluestore: include modified objects in flush list even if onode unchanged Reviewed-by: Igor Fedotov Reviewed-by: xie xingguo --- f674fa24fbd05e88aa501fbe93c7121e55d57f51 diff --cc src/os/bluestore/BlueStore.cc index 2bcd2163e25,514f0ad7e20..13b80e1e3af --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@@ -6413,10 -6412,21 +6413,23 @@@ void BlueStore::_txc_write_nodes(TransC o->flush_txns.insert(txc); } + // objects we modified but didn't affect the onode + auto p = txc->modified_objects.begin(); + while (p != txc->modified_objects.end()) { + if (txc->onodes.count(*p) == 0) { + std::lock_guard l((*p)->flush_lock); + (*p)->flush_txns.insert(txc); + ++p; + } else { + // remove dups with onodes list to avoid problems in _txc_finish + p = txc->modified_objects.erase(p); + } + } + // finalize shared_blobs for (auto sb : txc->shared_blobs) { + string key; + get_shared_blob_key(sb->sbid, &key); if (sb->shared_blob.empty()) { dout(20) << " shared_blob 0x" << std::hex << sb->sbid << std::dec << " is empty" << dendl;