]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix race conditon during blob spliting
authorxiexingguo <xie.xingguo@zte.com.cn>
Tue, 11 Oct 2016 14:14:22 +0000 (22:14 +0800)
committerxiexingguo <xie.xingguo@zte.com.cn>
Tue, 11 Oct 2016 14:14:22 +0000 (22:14 +0800)
Signed-off-by: xiexingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.h

index 0bfc7d75a8f8a4e0215d7b7c0538835f7520365c..95f190162db9abd6c39bafcf439244adf6f97612 100644 (file)
@@ -437,6 +437,7 @@ public:
     }
 
     bool can_split() const {
+      std::lock_guard<std::recursive_mutex> l(shared_blob->bc.cache->lock);
       // splitting a BufferSpace writing list is too hard; don't try.
       return shared_blob->bc.writing.empty() && get_blob().can_split();
     }