]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
OSD: clean up in progress split state on pg removal
authorSamuel Just <sam.just@inktank.com>
Tue, 30 Apr 2013 22:48:10 +0000 (15:48 -0700)
committerSamuel Just <sam.just@inktank.com>
Wed, 1 May 2013 17:43:39 +0000 (10:43 -0700)
commit8a8ae159f5bf3dd663b7524b41b5bad276a4f6de
tree610b73a1eb3271e3a74b0bfeb11d194dc3e1ec6e
parentfe68afe9d10bc5d49a05a8bafa644d57783447cf
OSD: clean up in progress split state on pg removal

There are two cases: 1) The parent pg has not yet initiated the split 2) The
parent pg has initiated the split.

Previously in case 1), _remove_pg left the entry for its children in the
in_progress_splits map blocking subsequent peering attempts.

In case 1), we need to unblock requests on the child pgs for the parent on
parent removal.  We don't need to bother waking requests since any requests
received prior to the remove_pg request are necessarily obsolete.

In case 2), we don't need to do anything: the child will complete the split on
its own anyway.

Thus, we now track pending_splits vs in_progress_splits.  Children in
pending_splits are in state 1), in_progress_splits in state 2).  split_pgs
bumps pgs from pending_splits to in_progress_splits atomically with respect to
_remove_pg since the parent pg lock is held in both places.

Fixes: #4813
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/osd/OSD.cc
src/osd/OSD.h