nlinks gives us the number of hardlinks to the object.
nlinks should be 1 + snapcolls.size(). This will allow
us to detect links which remain in an erroneous snap
collection.
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit
e65ea70ea64025fbb0709ee8596bb2878be0bbdc)
<< std::endl;
errors = true;
}
+ if (nlinks != snapcolls.size() + 1) {
+ out << info.pgid << " osd." << osd << " unaccounted for links on object "
+ << hoid << " snapcolls " << snapcolls << " nlinks " << nlinks
+ << std::endl;
+ errors = true;
+ }
return errors;
}