Fix object creation check for statistics

Vitaliy Filippov 2022-12-21 02:47:26 +03:00
parent c08d1f2dfe
commit 31bd1ec145
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ struct osd_primary_op_data_t
pg_num_t pg_num;
object_id oid;
uint64_t target_ver;
uint64_t fact_ver = 0;
uint64_t orig_ver = 0, fact_ver = 0;
uint64_t scheme = 0;
int n_subops = 0, done = 0, errors = 0, epipe = 0;
int degraded = 0, pg_size, pg_data_size;

View File

@ -138,6 +138,7 @@ resume_3:
}
}
// Send writes
op_data->orig_ver = op_data->fact_ver;
if ((op_data->fact_ver >> (64-PG_EPOCH_BITS)) < pg.epoch)
{
op_data->target_ver = ((uint64_t)pg.epoch << (64-PG_EPOCH_BITS)) | 1;
@ -194,7 +195,7 @@ resume_7:
{
return;
}
if (op_data->fact_ver == 1)
if (op_data->orig_ver == 0)
{
// Object is created
pg.clean_count++;