compdiff --git a/src/block/block_compact.c b/src/block/block_compact.c
index edb5505be..114d9cd76 100644
--- a/src/block/block_compact.c
+++ b/src/block/block_compact.c
@@ -72,7 +72,7 @@ __wt_block_compact_get_progress_stats(WT_SESSION_IMPL *session, WT_BM *bm,
  *     Output compact progress message.
  */
 void
-__wt_block_compact_progress(WT_SESSION_IMPL *session, WT_BLOCK *block, u_int *msg_countp)
+__wt_block_compact_progress(WT_SESSION_IMPL *session, WT_BLOCK *block)
 {
     struct timespec cur_time;
     uint64_t time_diff;
@@ -84,8 +84,8 @@ __wt_block_compact_progress(WT_SESSION_IMPL *session, WT_BLOCK *block, u_int *ms
 
     /* Log one progress message every twenty seconds. */
     time_diff = WT_TIMEDIFF_SEC(cur_time, session->compact->begin);
-    if (time_diff / WT_PROGRESS_MSG_PERIOD > *msg_countp) {
-        ++*msg_countp;
+    if (time_diff / WT_PROGRESS_MSG_PERIOD > session->compact->prog_msg_count) {
+        ++session->compact->prog_msg_count;
         __wt_verbose_debug1(session, WT_VERB_COMPACT_PROGRESS,
           " compacting %s for %" PRIu64 " seconds; reviewed %" PRIu64 " pages, rewritten %" PRIu64
           " pages",
diff --git a/src/block_cache/block_mgr.c b/src/block_cache/block_mgr.c
index e65bb64b4..9b344d494 100644
--- a/src/block_cache/block_mgr.c
+++ b/src/block_cache/block_mgr.c
@@ -373,9 +373,9 @@ __bm_compact_page_skip_readonly(
  *     Output compact progress message.
  */
 static void
-__bm_compact_progress(WT_BM *bm, WT_SESSION_IMPL *session, u_int *msg_countp)
+__bm_compact_progress(WT_BM *bm, WT_SESSION_IMPL *session)
 {
-    __wt_block_compact_progress(session, bm->block, msg_countp);
+    __wt_block_compact_progress(session, bm->block);
 }
 
 /*
diff --git a/src/btree/bt_compact.c b/src/btree/bt_compact.c
index 6e4d4c21f..8d01449c6 100644
--- a/src/btree/bt_compact.c
+++ b/src/btree/bt_compact.c
@@ -303,7 +303,7 @@ __wt_compact(WT_SESSION_IMPL *session)
     WT_BM *bm;
     WT_DECL_RET;
     WT_REF *ref;
-    u_int i, msg_count;
+    u_int i;
     bool skip;
 
     uint64_t stats_pages_rewritten; /* Pages rewritten */
@@ -341,7 +341,7 @@ __wt_compact(WT_SESSION_IMPL *session)
          * we're making the problem worse.
          */
         if (++i > 100) {
-            bm->compact_progress(bm, session, &msg_count);
+            bm->compact_progress(bm, session);
             WT_ERR(__wt_session_compact_check_timeout(session));
             if (session->event_handler->handle_general != NULL) {
                 ret = session->event_handler->handle_general(session->event_handler,
diff --git a/src/include/block.h b/src/include/block.h
index dd6af8235..a40ebd9c9 100644
--- a/src/include/block.h
+++ b/src/include/block.h
@@ -184,7 +184,7 @@ struct __wt_bm {
     int (*compact_page_rewrite)(WT_BM *, WT_SESSION_IMPL *, uint8_t *, size_t *, bool *);
     int (*compact_page_skip)(WT_BM *, WT_SESSION_IMPL *, const uint8_t *, size_t, bool *);
     int (*compact_skip)(WT_BM *, WT_SESSION_IMPL *, bool *);
-    void (*compact_progress)(WT_BM *, WT_SESSION_IMPL *, u_int *);
+    void (*compact_progress)(WT_BM *, WT_SESSION_IMPL *);
     int (*compact_start)(WT_BM *, WT_SESSION_IMPL *);
     int (*corrupt)(WT_BM *, WT_SESSION_IMPL *, const uint8_t *, size_t);
     int (*free)(WT_BM *, WT_SESSION_IMPL *, const uint8_t *, size_t);
diff --git a/src/include/compact.h b/src/include/compact.h
index bf1a31b21..637f4a60e 100644
--- a/src/include/compact.h
+++ b/src/include/compact.h
@@ -7,9 +7,10 @@
  */
 
 struct __wt_compact_state {
-    uint32_t lsm_count;  /* Number of LSM trees seen */
-    uint32_t file_count; /* Number of files seen */
-    uint64_t max_time;   /* Configured timeout */
+    uint32_t lsm_count;      /* Number of LSM trees seen */
+    uint32_t file_count;     /* Number of files seen */
+    uint64_t max_time;       /* Configured timeout */
+    uint64_t prog_msg_count; /* Progress message count */
 
     struct timespec begin; /* Starting time */
 };
diff --git a/src/include/extern.h b/src/include/extern.h
index e12f55150..b2092de96 100644
--- a/src/include/extern.h
+++ b/src/include/extern.h
@@ -1771,8 +1771,7 @@ extern void __wt_blkcache_set_readonly(WT_SESSION_IMPL *session) WT_GCC_FUNC_DEC
 extern void __wt_block_ckpt_destroy(WT_SESSION_IMPL *session, WT_BLOCK_CKPT *ci);
 extern void __wt_block_compact_get_progress_stats(WT_SESSION_IMPL *session, WT_BM *bm,
   uint64_t *pages_reviewedp, uint64_t *pages_skippedp, uint64_t *pages_rewrittenp);
-extern void __wt_block_compact_progress(
-  WT_SESSION_IMPL *session, WT_BLOCK *block, u_int *msg_countp);
+extern void __wt_block_compact_progress(WT_SESSION_IMPL *session, WT_BLOCK *block);
 extern void __wt_block_configure_first_fit(WT_BLOCK *block, bool on);
 extern void __wt_block_ext_free(WT_SESSION_IMPL *session, WT_EXT *ext);
 extern void __wt_block_extlist_free(WT_SESSION_IMPL *session, WT_EXTLIST *el);
 