Skip to content

Commit

Permalink
Merge pull request #5783 from dzafman/wip-12738
Browse files Browse the repository at this point in the history
Fix scrub error handling and log output
Add set-size and remove-clone-metadata to ceph-objectstore-tool
Fix trim_object() to not crash on corrupt snapset
Add scrub clones test and add clones to ceph-objectstore-tool test

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
  • Loading branch information
dzafman committed Oct 30, 2015
2 parents e74183e + d712737 commit 19565e1
Show file tree
Hide file tree
Showing 10 changed files with 1,079 additions and 181 deletions.
2 changes: 1 addition & 1 deletion src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2873,7 +2873,7 @@ void OSD::load_pgs()
derr << __func__ << ": could not find map for epoch " << map_epoch
<< " on pg " << pgid << ", but the pool is not present in the "
<< "current map, so this is probably a result of bug 10617. "
<< "Skipping the pg for now, you can use ceph_objectstore_tool "
<< "Skipping the pg for now, you can use ceph-objectstore-tool "
<< "to clean it up later." << dendl;
continue;
} else {
Expand Down
12 changes: 11 additions & 1 deletion src/osd/PG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3503,8 +3503,18 @@ void PG::_scan_snaps(ScrubMap &smap)
if (hoid.snap < CEPH_MAXSNAP) {
// fake nlinks for old primaries
bufferlist bl;
if (o.attrs.find(OI_ATTR) == o.attrs.end()) {
o.nlinks = 0;
continue;
}
bl.push_back(o.attrs[OI_ATTR]);
object_info_t oi(bl);
object_info_t oi;
try {
oi = bl;
} catch(...) {
o.nlinks = 0;
continue;
}
if (oi.snaps.empty()) {
// Just head
o.nlinks = 1;
Expand Down
Loading

0 comments on commit 19565e1

Please sign in to comment.