File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments