From de96efed2f0749d6087f4ed6c85d0bebb51b1a70 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 11 May 2026 13:10:17 +0300 Subject: [PATCH] Fix 2^(64-PG_EPOCH_BITS) - 1 check --- src/osd/osd_primary_write.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/osd_primary_write.cpp b/src/osd/osd_primary_write.cpp index 0714e8a1..6e1bd1fe 100644 --- a/src/osd/osd_primary_write.cpp +++ b/src/osd/osd_primary_write.cpp @@ -188,7 +188,7 @@ resume_3: } else { - if ((op_data->fact_ver & ((uint64_t)1 << (64-PG_EPOCH_BITS) - 1)) == ((uint64_t)1 << (64-PG_EPOCH_BITS) - 1)) + if ((op_data->fact_ver & (((uint64_t)1 << (64-PG_EPOCH_BITS)) - 1)) == (((uint64_t)1 << (64-PG_EPOCH_BITS)) - 1)) { assert(pg.epoch != (((uint64_t)1 << PG_EPOCH_BITS)-1)); pg.epoch++;