From: xiexingguo Date: Tue, 11 Oct 2016 14:14:22 +0000 (+0800) Subject: os/bluestore: fix race conditon during blob spliting X-Git-Tag: v11.1.0~663^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d300929ae920214e7409c61e9f309d4ef328a52b;p=ceph.git os/bluestore: fix race conditon during blob spliting Signed-off-by: xiexingguo --- diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 0bfc7d75a8f..95f190162db 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(); }