return _read(oi.soid, offset, length, op.flags).safe_then(
[&oi, &osd_op](auto&& bl) -> read_errorator::future<> {
if (!_read_verify_data(oi, bl)) {
+ // crc mismatches
return crimson::ct_error::object_corrupted::make();
}
logger().debug("read: data length: {}", bl.length());
osd_op.rval = bl.length();
osd_op.outdata = std::move(bl);
return read_errorator::now();
- });
+ }, crimson::ct_error::input_output_error::handle([] {
+ return read_errorator::future<>{crimson::ct_error::object_corrupted::make()};
+ }),
+ read_errorator::pass_further{});
}
PGBackend::read_errorator::future<>
osd_op.op.extent.length, os.oi.soid);
return read_errorator::make_ready_future<>();
} else {
- // TODO: repair it if crc mismatches
+ // crc mismatches
return crimson::ct_error::object_corrupted::make();
}
- });
+ }, crimson::ct_error::input_output_error::handle([] {
+ return read_errorator::future<>{crimson::ct_error::object_corrupted::make()};
+ }),
+ read_errorator::pass_further{});
});
});
}