]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #12541 from liewegas/wip-bluestore-omap-flush
authorSage Weil <sage@redhat.com>
Tue, 20 Dec 2016 03:15:37 +0000 (21:15 -0600)
committerGitHub <noreply@github.com>
Tue, 20 Dec 2016 03:15:37 +0000 (21:15 -0600)
os/bluestore: include modified objects in flush list even if onode unchanged

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
1  2 
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index 2bcd2163e25fb6a30a2abb0f4dadc9cfef8c6b15,514f0ad7e20613b5c4dcd1d448ca084bf63bc880..13b80e1e3afaa14ec3cc427f9602b55fca5c48f0
@@@ -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<std::mutex> 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;
Simple merge