]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ReplicatedPG: clean up num_dirty adjustments 1391/head
authorSamuel Just <sam.just@inktank.com>
Thu, 6 Mar 2014 20:05:07 +0000 (12:05 -0800)
committerSamuel Just <sam.just@inktank.com>
Thu, 6 Mar 2014 20:05:10 +0000 (12:05 -0800)
commiteca7e633c81f6e716dae2bead79ff78feacc8d62
tree89f24e9c17ad70c32ab260b61e8ec0933476692d
parent7403b235444b7ff5f80e15e1997063a81270d730
ReplicatedPG: clean up num_dirty adjustments

Previously, a _delete_head() followed by a recreation on an object in
the same transaction would result in num_dirty being decremented in
_delete_head() without the flag being cleared.  make_writeable() would
then see exists and was_dirty and therefore not increment num_dirty
resulting in a mismatch.  Rather than trying to maintain the num_dirty
number in _delete_head(), rollback_to(), and make_writeable(), it seems
simpler to do the adjustment once in make_writeable based on undirty,
ctx->obc->obs.oi, and ctx->new_obs->oi.

Fixes: 7393
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc