]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: always update up_thru if pg changes before going active
authorSage Weil <sage@newdream.net>
Fri, 12 Feb 2010 21:26:19 +0000 (13:26 -0800)
committerSage Weil <sage@newdream.net>
Fri, 12 Feb 2010 21:26:19 +0000 (13:26 -0800)
commitd7eb8ce54d5eb3971b6b2e1095c69b5fd6c1b1c2
treecf7664906a5bb181e8a873cfc4f6367968625e94
parentf931fec5583665f7774155fe92ffad9d2a6cf865
osd: always update up_thru if pg changes before going active

We already required this if prior PG members were down, so this
affected the 'failure' case.  We now also require it for
non-failure PG changes (expansion, migration).

This fixes our maybe_went_rw calculation for prior PG intervals,
which is based on up_thru.  If maybe_went_rw is false when the
pg actually went rw, we can lose (and have lost) data.  But it is
not practical to calculate without up_thru being consistently
updated, because determining whether a pg would have been able to
go active depends on knowing last_epoch_started at a previous
point in time, which then determines how many prior intervals
may have been considered, which in turn determines whether
up_thru would have been updated, etc.  Much simpler to update it
all the time.

This should not impose a significantly greater cost, since we
already need it for the failure case.  And in general the
migration/expansion/whatever case is no more common nor critical
than the failure case.
src/osd/PG.cc
src/osd/PG.h