osd: Make the _scrub routine produce good output and detect errors properly
Catch decode errors so osd doesn't crash on corrupt OI_ATTR or SS_ATTR
Use boost::optional<> to make current state clearer
Create next_clone as needed using head/curclone
Add equivalent logic after getting to end of scrubmap.objects
Fixes: #12738
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
a23036c6fd7de5d1dbc2bd30c967c0be51d94ca5)
Conflicts:
src/osd/ReplicatedPG.cc (no num_objects_pinned in hammer)
src/osd/ReplicatedPG.h (no get_temp_recovery_object() in hammer)