]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
DBObjectMap: lock header_lock on sync() 3948/head
authorSamuel Just <sjust@redhat.com>
Fri, 20 Feb 2015 21:43:46 +0000 (13:43 -0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 11 Mar 2015 09:17:36 +0000 (10:17 +0100)
commit5865411360f722ec511f2df6656d4ba975bef8eb
tree4dd0c244622bc65b28ace08892b0a97af75761d8
parentbaa74b88a4f4b6073b99b7a9774692b37405b59e
DBObjectMap: lock header_lock on sync()

Otherwise, we can race with another thread updating state.seq
resulting in the old, smaller value getting persisted.  If there
is a crash at that time, we will reuse a sequence number, resulting
in an inconsistent node tree and bug #9891.

Fixes: 9891
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 2b63dd25fc1c73fa42e52e9ea4ab5a45dd9422a0)

Conflicts:
src/os/DBObjectMap.cc
        because we have state.v = 1; instead of state.v = 2;
src/os/DBObjectMap.cc