Skip to content

Commit afd4266

Browse files
jiawdNitzanMordhai
authored andcommitted
osd: Adjust code style
Fixes: https://tracker.ceph.com/issues/53240 Signed-off-by: jiawd <[email protected]>
1 parent 83d3523 commit afd4266

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/osd/PrimaryLogPG.cc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6740,6 +6740,7 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
67406740
oi.size - op.extent.truncate_size);
67416741
ctx->modified_ranges.union_of(trim);
67426742
ctx->clean_regions.mark_data_region_dirty(op.extent.truncate_size, oi.size - op.extent.truncate_size);
6743+
oi.clear_data_digest();
67436744
}
67446745
if (op.extent.truncate_size != oi.size) {
67456746
truncate_update_size_and_usage(ctx->delta_stats,
@@ -6765,16 +6766,16 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
67656766

67666767
if (op.extent.length == 0) {
67676768
if (op.extent.offset > oi.size) {
6768-
if (seq && (seq > op.extent.truncate_seq)) {
6769-
//do nothing
6770-
//write arrived after truncate, we should not truncate to offset
6771-
} else {
6769+
if (seq && (seq > op.extent.truncate_seq)) {
6770+
//do nothing
6771+
//write arrived after truncate, we should not truncate to offset
6772+
} else {
67726773
t->truncate(
67736774
soid, op.extent.offset);
6774-
truncate_update_size_and_usage(ctx->delta_stats, oi,
6775-
op.extent.offset);
6776-
oi.clear_data_digest();
6777-
}
6775+
truncate_update_size_and_usage(ctx->delta_stats, oi,
6776+
op.extent.offset);
6777+
oi.clear_data_digest();
6778+
}
67786779
} else {
67796780
t->nop(soid);
67806781
}

0 commit comments

Comments
 (0)