The data_included portion could be empty, e.g., due to there are
too many omap entries and can not be sent in one shot, which as
a result may end up crashing the OSD.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
}
out_op->data.claim_append(bit);
}
- if (progress.first && out_op->data_included.begin().get_start() == 0 &&
+ if (progress.first && !out_op->data_included.empty() &&
+ out_op->data_included.begin().get_start() == 0 &&
out_op->data.length() == oi.size && oi.is_data_digest()) {
uint32_t crc = out_op->data.crc32c(-1);
if (oi.data_digest != crc) {