]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: fix waiting_for_peered vs flushing 17759/head
authorSage Weil <sage@redhat.com>
Fri, 15 Sep 2017 20:03:38 +0000 (16:03 -0400)
committerSage Weil <sage@redhat.com>
Mon, 9 Oct 2017 20:27:51 +0000 (15:27 -0500)
commit8f7dc8b0d8135b20322c09a5909ad43d4c83b0ea
tree95706442d416f895b3d8cb6540ec8c596d0135a5
parentd509468ac7fe66ab0a98a1e721e0931e3aa16109
osd: fix waiting_for_peered vs flushing

on_flush() requeues waiting_for_peered, but we flush twice on the
primary during peering, and we don't want to requeue the first one
(when we have the master pg log merged).

Fix by moving waiting_for_peered to waiting_for_flush if we aren't
already flush on _activate_committed.  If we get an op and are
peered but not flushed, queue ops there.  (We can simplify this
check a bit since pgbackend inactive message handling doesn't care
about flushed or not flushed.)  When flushed, we requeue
waiting_for_flush.

The waiting_for_flush, waiting_for_peered, and waiting_for_active
lists are all mutually exclusive, so this mostly serves to
clarify what we are waiting for (not to keep items separate). And
it means that on_flushed() will only requeue things that were
waiting for it specifically.

Fixes: http://tracker.ceph.com/issues/21407
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/PrimaryLogPG.cc