]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: take collection lock when trimming collection cache
authorSage Weil <sage@redhat.com>
Thu, 2 Jun 2016 18:39:15 +0000 (14:39 -0400)
committerSage Weil <sage@redhat.com>
Fri, 3 Jun 2016 15:00:30 +0000 (11:00 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 5fbae40d998102d6311f6dee04f2827e3225f115..388a0f7861de3ddd399ef20b18cbc412cd8c8a0c 100644 (file)
@@ -4444,6 +4444,7 @@ void BlueStore::_osr_reap_done(OpSequencer *osr)
     }
 
     if (txc->first_collection) {
+      RWLock::WLocker l(txc->first_collection->lock);
       txc->first_collection->onode_map.trim();
       txc->first_collection->buffer_cache.trim(
        g_conf->bluestore_collection_buffer_cache_size);