From: xie xingguo Date: Fri, 5 Feb 2016 09:34:51 +0000 (+0800) Subject: os/bluestore: fix race condition X-Git-Tag: v10.0.4~33^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1e8719f95556f7ac71d06f7e3281927fbfb0d86a;p=ceph.git os/bluestore: fix race condition The get_omap_iterator shall check the existence of onode too, which may race with the rename method. Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index ab4c7d96b93e..31d64c6ed4e3 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3396,7 +3396,7 @@ ObjectMap::ObjectMapIterator BlueStore::get_omap_iterator( } RWLock::RLocker l(c->lock); OnodeRef o = c->get_onode(oid, false); - if (!o) { + if (!o || !o->exists) { dout(10) << __func__ << " " << oid << "doesn't exist" <