]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: simplify pg creation
authorSage Weil <sage@redhat.com>
Sat, 14 Nov 2015 03:11:17 +0000 (22:11 -0500)
committerSage Weil <sage@redhat.com>
Mon, 23 Nov 2015 13:38:51 +0000 (08:38 -0500)
commit53f2c7f291d94774dda7182d00fd26af4ee65f6f
treeb29e28cda99e8a2ca39716ec6eb731ca4f74b6ec
parent57121dbe2cbbbd188c9aff38a3a534df038982c9
osd: simplify pg creation

We used to have a complicated pg creation process in which we
would query any previous mappings for the pg before we created the
new 'empty' pg locally.  The tracking of the prior mappings was
very simple (and broken), but it didn't really matter because the
mon would resend pg create messages periodically.  Now it doesn't,
so that broke.

However, none of this is necessary: the PG peering process does
all of the same things.  Namely, it

- enumerates past intervals
- determines which ones may have been rw
- queries OSDs from each one to gather any potential changes

This is a more robust version of what the creation code was (or
should have been doing).  So, let's rip it all out and let
peering handle it.  As long as the newly instantiated PG sets
last_epoch_started and _clean to the created epoch we will probe
and consider all of these prior mappings and find any previous
instance of the PG (if one existed).

Yay for removing unnecessary code!

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/osd/OSD.cc
src/osd/OSD.h