]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
PGLog::rewind_divergent_log must not call mark_dirty_from on end() 366/head
authorLoic Dachary <loic@dachary.org>
Wed, 19 Jun 2013 20:50:30 +0000 (22:50 +0200)
committerLoic Dachary <loic@dachary.org>
Wed, 19 Jun 2013 20:50:30 +0000 (22:50 +0200)
commit09e869a4c4424832a7bdc1933fad186d2536517a
tree1483a55f75a2752b358e3955a7ea57ec7666ff43
parent02b3c552659299c7c7c2e789f0660f0add2f639f
PGLog::rewind_divergent_log must not call mark_dirty_from on end()

PGLog::rewind_divergent_log is dereferencing iterator "p" though it is
already past the end of its container. When entering the loop for the
first time, p is log.log.end() and must not be dereferenced.

mark_dirty_from must only be called after p--. It
will not rewind past begin() because of the

  if (p == log.log.begin())

test above.

http://tracker.ceph.com/issues/5398 fixes #5398

Signed-off-by: Loic Dachary <loic@dachary.org>
src/osd/PGLog.cc