]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: set STRAY on pg load when non-primary
authorSage Weil <sage@inktank.com>
Sat, 28 Jul 2012 17:05:47 +0000 (10:05 -0700)
committerSage Weil <sage@inktank.com>
Sat, 28 Jul 2012 17:05:47 +0000 (10:05 -0700)
commit7b9d37c662313929b52011ddae47cc8abab99095
tree32dc6d17bf70031b377b42468a42a13a4686cbdb
parent96feca450c5505a06868bc012fe998a03371b77f
osd: set STRAY on pg load when non-primary

The STRAY bit indicates that we should annouce ourselves to the primary,
but it is only set in start_peering_interval().  We also need to set it
initially, so that a PG that is loaded but whose role does not change
(e.g., the stray replica stays a stray) will notify the primary.

Observed:
 - osd starts up
 - mapping does not change, STRAY not set
 - does not announce to primary
 - primary does not re-check must_have_unfound, objects appear unfound

Fix this by initializing STRAY when pg is loaded or created whenever we
are not the primary.

Fixes: #2866
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc