]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix split vs finish_write race
authorSage Weil <sage@redhat.com>
Mon, 13 Aug 2018 17:10:31 +0000 (12:10 -0500)
committerSage Weil <sage@redhat.com>
Mon, 13 Aug 2018 17:10:59 +0000 (12:10 -0500)
commitf21f1f14f2d2a465ba072118bd8e32271bf8906e
tree3dc5e08210336d02da8981f1e67219d4bf0ef4b1
parent8f3560d4ed461ad2d64bc586f2ffd1b39701bfe7
os/bluestore: fix split vs finish_write race

In _tcx_finish(), we were looking at the right Cache for the collection,
and then calling finish_write with that Cache and taking the lock.  This
could race with a split_cache() such that after we got the lock the
collection was not on a different cache.  This would in turn lead to a
failed assertion later on in _rm_buffer when the sharedblob was trimmed.

Fixes: http://tracker.ceph.com/issues/24439
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h