]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix split vs finish_write race 24992/head
authorSage Weil <sage@redhat.com>
Mon, 13 Aug 2018 17:10:31 +0000 (12:10 -0500)
committerJonathan Brielmaier <jbrielmaier@suse.de>
Thu, 8 Nov 2018 10:14:54 +0000 (11:14 +0100)
commit4a51626174297a5fa3e98d3ffe9d9fe9b20ee014
tree6b6752a8af4afd8244e14ec91bb37f41a3ae1f6a
parent9386263faf9b4e086ee496067fe4bc16030309b4
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>
(cherry picked from commit f21f1f14f2d2a465ba072118bd8e32271bf8906e)
Signed-off-by: Jonathan Brielmaier <jbrielmaier@suse.de>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h