From 5ed54e78ac77a94aa37674ae0d484f687812f984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 8 Nov 2019 12:43:04 +0200 Subject: Cleanup: Remove redundant XDES_FREE_BIT parameters The page allocation bitmaps in the extent descriptor pages contain two bits per page: XDES_FREE_BIT and XDES_CLEAN_BIT, which is unused. Simplify read access. xdes_is_free(descr,mtr): Remove. Use !xdes_get_n_used(descr) instead. xdes_is_free(): Replaces xdes_get_bit(), xdes_mtr_get_bit(). xdes_find_free(): Replaces xdes_find_bit(). fsp_seg_inode_page_get_nth_inode(): Remove the redundant parameters physical_size, mtr. fsp_seg_inode_page_find_used(), fsp_seg_inode_page_find_free(): Remove the redundant parameter mtr. --- extra/innochecksum.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extra/innochecksum.cc') diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index f971fac20ec..3bc00b339b1 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -895,8 +895,8 @@ parse_page( const byte* des = xdes + XDES_ARR_OFFSET + XDES_SIZE * ((page_no & (physical_page_size - 1)) / FSP_EXTENT_SIZE); - if (xdes_get_bit(des, XDES_FREE_BIT, - page_no % FSP_EXTENT_SIZE)) { + if (xdes_is_free(des, + page_no % FSP_EXTENT_SIZE)) { index.free_pages++; return; } -- cgit v1.2.1