]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: clear PG_STATE_CLEAN when repair object 30243/head
authorZengran Zhang <zhangzengran@sangfor.com.cn>
Tue, 20 Aug 2019 07:06:09 +0000 (15:06 +0800)
committerNathan Cutler <ncutler@suse.com>
Sat, 7 Sep 2019 09:39:54 +0000 (11:39 +0200)
commit75d2382aff6917a02f173f1f8590124555fbd2b8
treeb513550ac520bafef66ec5f5205d8e14a8828b17
parent5b36a9510f7f2cbc6194d885b138b7039ed36bf1
osd: clear PG_STATE_CLEAN when repair object

there is a race be found, when we repair object on clean state,
we queue a DoRecovery peering event, but before the peering event
dequeue,a snaptrim event on the missing object's snap dequeue,
then we will get pass the context< SnapTrimmer >().can_trim()
and go to get the context of the missing object(snapdir)

we can avoid this by clear clean state when we found missing..

Fixes: https://tracker.ceph.com/issues/41348
Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
(cherry picked from commit 521f095c6505bbee7570fb3c01b32436bdbf65a4)

Conflicts:
src/osd/PrimaryLogPG.cc
- assert() instead of ceph_assert(), and Feature PR
  https://github.com/ceph/ceph/pull/26942 ("Improvements to auto repair") is
  not being backported
src/osd/PrimaryLogPG.cc