From d300929ae920214e7409c61e9f309d4ef328a52b Mon Sep 17 00:00:00 2001 From: xiexingguo Date: Tue, 11 Oct 2016 22:14:22 +0800 Subject: [PATCH] os/bluestore: fix race conditon during blob spliting Signed-off-by: xiexingguo --- src/os/bluestore/BlueStore.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 0bfc7d75a8f8a..95f190162db9a 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -437,6 +437,7 @@ public: } bool can_split() const { + std::lock_guard 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(); } -- 2.39.5