mirror of
https://github.com/ceph/ceph
synced 2025-01-18 09:02:08 +00:00
ReplicatedPG: fix size checking for ECBackend pools
Allow the backend to adjust the logical object size before checking against the ondisk size. Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
510585b795
commit
ca323ff627
@ -10880,16 +10880,19 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
|
||||
bv.push_back(p->second.attrs[OI_ATTR]);
|
||||
object_info_t oi(bv);
|
||||
|
||||
if (oi.size != p->second.size) {
|
||||
if (pgbackend->be_get_ondisk_size(oi.size) != p->second.size) {
|
||||
osd->clog.error() << mode << " " << info.pgid << " " << soid
|
||||
<< " on disk size (" << p->second.size
|
||||
<< ") does not match object info size (" << oi.size << ")";
|
||||
<< ") does not match object info size ("
|
||||
<< oi.size << ") ajusted for ondisk to ("
|
||||
<< pgbackend->be_get_ondisk_size(oi.size)
|
||||
<< ")";
|
||||
++scrubber.shallow_errors;
|
||||
}
|
||||
|
||||
dout(20) << mode << " " << soid << " " << oi << dendl;
|
||||
|
||||
stat.num_bytes += p->second.size;
|
||||
stat.num_bytes += oi.size;
|
||||
|
||||
if (oi.is_dirty())
|
||||
++stat.num_objects_dirty;
|
||||
@ -10926,7 +10929,7 @@ void ReplicatedPG::_scrub(ScrubMap& scrubmap)
|
||||
assert(soid.snap == *curclone);
|
||||
}
|
||||
|
||||
assert(p->second.size == snapset.clone_size[*curclone]);
|
||||
assert(oi.size == snapset.clone_size[*curclone]);
|
||||
|
||||
// verify overlap?
|
||||
// ...
|
||||
|
Loading…
Reference in New Issue
Block a user