From 142442d571dd86c630019ece82e36dc73e1e5f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 11 Nov 2019 14:18:50 +0200 Subject: [PATCH] MDEV-21024: Cleanup XDES_CLEAN_BIT The XDES_CLEAN_BIT is always set for every element of the page allocation bitmap in the extent descriptor pages. Do not bother touching it, to avoid redundant writes. --- storage/innobase/fsp/fsp0fsp.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index 2297ac861ec..78d562be9a3 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -1524,7 +1524,8 @@ fsp_free_page( const ulint bit = offset % FSP_EXTENT_SIZE; xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr); - xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr); + /* xdes_init() should have set all XDES_CLEAN_BIT */ + ut_ad(xdes_get_bit(descr, XDES_CLEAN_BIT, bit)); frag_n_used = mtr_read_ulint(header + FSP_FRAG_N_USED, MLOG_4BYTES, mtr); @@ -3085,7 +3086,8 @@ fseg_free_page_low( const ulint bit = offset % FSP_EXTENT_SIZE; xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr); - xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr); + /* xdes_init() should have set all XDES_CLEAN_BIT */ + ut_ad(xdes_get_bit(descr, XDES_CLEAN_BIT, bit)); if (xdes_is_free(descr, mtr)) { /* The extent has become free: free it to space */