raw_write_set.insert(extent.get_off(), extent.get_len());
}
+ auto orig_size = projected_size;
for (auto extent = raw_write_set.begin();
extent != raw_write_set.end();
++extent) {
head_start = projected_size;
}
if (head_start != head_finish &&
- head_start < projected_size) {
- assert(head_finish <= projected_size);
+ head_start < orig_size) {
+ assert(head_finish <= orig_size);
assert(head_finish - head_start == sinfo.get_stripe_width());
+ ldpp_dout(dpp, 20) << __func__ << ": reading partial head stripe "
+ << head_start << "~" << sinfo.get_stripe_width()
+ << dendl;
plan.to_read[i.first].union_insert(
head_start, sinfo.get_stripe_width());
}
extent.get_start() + extent.get_len());
if (tail_start != tail_finish &&
(head_start == head_finish || tail_start != head_start) &&
- tail_start < projected_size) {
- assert(tail_finish <= projected_size);
+ tail_start < orig_size) {
+ assert(tail_finish <= orig_size);
assert(tail_finish - tail_start == sinfo.get_stripe_width());
+ ldpp_dout(dpp, 20) << __func__ << ": reading partial tail stripe "
+ << tail_start << "~" << sinfo.get_stripe_width()
+ << dendl;
plan.to_read[i.first].union_insert(
tail_start, sinfo.get_stripe_width());
}
ldpp_dout(dpp, 20) << __func__ << ": truncating out to "
<< truncating_to
<< dendl;
- will_write.union_insert(projected_size, truncating_to - projected_size);
+ will_write.union_insert(projected_size,
+ truncating_to - projected_size);
projected_size = truncating_to;
}