Skip to content

Commit

Permalink
Merge pull request #30275 from pdvian/wip-41704-mimic
Browse files Browse the repository at this point in the history
 mimic: osd/PrimaryLogPG: update oi.size on write op implicitly truncating ob…

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
  • Loading branch information
yuriw committed Oct 7, 2019
2 parents 1720691 + 8513740 commit df87c9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/osd/PrimaryLogPG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6465,6 +6465,8 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
if (op.extent.offset > oi.size) {
t->truncate(
soid, op.extent.offset);
truncate_update_size_and_usage(ctx->delta_stats, oi,
op.extent.offset);
} else {
t->nop(soid);
}
Expand Down

0 comments on commit df87c9d

Please sign in to comment.