]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: leave PG registered (and stray) during delete; reimplement pg deletion
authorSage Weil <sage@redhat.com>
Sat, 9 Dec 2017 20:42:10 +0000 (14:42 -0600)
committerSage Weil <sage@redhat.com>
Thu, 11 Jan 2018 23:07:00 +0000 (17:07 -0600)
commitd77dd6352ee4cbc9f7c6c145567aa24cf952f2f2
treed0d8d97ff002da687a385bcf07ff897b262a0ba1
parente59e7ad2ffa3178c0134bc80dd55375d1e8da84d
osd: leave PG registered (and stray) during delete; reimplement pg deletion

A lot of awkward complexity is implemented in OSD to handle PGs that aren't in
pg_map and are in the process of being deleted.  This is hard because if the
PG is recreated (or split, or whatever) then we need to stop the deletion and
create a fresh PG referencing the same data.

Instead, leave deleting PGs registered and Stray, with a new peering state
Stray/Deleting.  Let them continue to process OSDMaps, splits, peering intervals,
and so on.  If they are not fully deleted, they'll go back to Reset -> Stray and
so on and the new primary will get the notify and decide what to do with them
(usually instruct them to delete again).

This (1) streamlines and cleans up the code structure, and also (2) gets rid of
the special purpose RemoveWQ and moves the delete work into the main op_wq
where it can get throttled and so on.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/legacy_config_opts.h
src/common/options.cc
src/osd/OSD.cc
src/osd/OSD.h
src/osd/OpQueueItem.cc
src/osd/OpQueueItem.h
src/osd/PG.cc
src/osd/PG.h
src/osd/PrimaryLogPG.cc
src/osd/mClockOpClassSupport.cc
src/osd/mClockOpClassSupport.h