Whamcloud - gitweb
LU-15002 mke2fs: set free blocks accurately for groups has GDT 73/52273/3
authorLi Dongyang <dongyangli@ddn.com>
Tue, 5 Sep 2023 13:12:35 +0000 (23:12 +1000)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 25 Sep 2023 05:58:00 +0000 (05:58 +0000)
commit6e18f9e2c1ae7300aade5f3b2d8b65b9f5e64fc3
tree572bd0fbce6873cdcb1dd785802e4dca181275c5
parent37440af03220e88cfcac5cdcee22c904bab87930
LU-15002 mke2fs: set free blocks accurately for groups has GDT

This patch is part of the preparation required to allow
GDT blocks expand beyond a single group,
it introduces 2 new interfaces:
- ext2fs_count_used_blocks(), to return the blocks used
in the bitmap range.
- ext2fs_reserve_super_and_bgd2() to return blocks used by
superblock/GDT blocks for every group, by looking up blocks used.

Change-Id: Ic26de963ed234af1099d00be6f7b6d0edc057c97
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/52273
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lib/ext2fs/alloc_sb.c
lib/ext2fs/ext2fs.h
lib/ext2fs/gen_bitmap64.c
lib/ext2fs/initialize.c
misc/mke2fs.c