]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
DBObjectMap: lock header_lock on sync() 4094/head
authorSamuel Just <sjust@redhat.com>
Fri, 20 Feb 2015 21:43:46 +0000 (13:43 -0800)
committerLoic Dachary <ldachary@redhat.com>
Thu, 19 Mar 2015 09:29:09 +0000 (10:29 +0100)
commit76535116823f02f0392226e5725fbfef14c277ba
tree08d62ed128362bd2a41452bd7d4f9e94222400f7
parent1f58a0adc3b23785fac00083d721b62f6a4c44a1
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