Whamcloud - gitweb
mke2fs: set free blocks accurately for groups has GDT
authorLi Dongyang <dongyangli@ddn.com>
Mon, 25 Sep 2023 06:08:00 +0000 (16:08 +1000)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Apr 2024 14:49:09 +0000 (10:49 -0400)
commitecb37fe311cd67fe7c86eae069551ad15fb20c03
tree53e606e480d17b5b6d12dbab1dd04b08901c8b5b
parentf7ef5f3e356d9ee3e20a4c591456da1cf8184814
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.

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Link: https://lore.kernel.org/r/20230925060801.1397581-1-dongyangli@ddn.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/alloc_sb.c
lib/ext2fs/ext2fs.h
lib/ext2fs/gen_bitmap64.c
lib/ext2fs/initialize.c
lib/ext2fs/openfs.c
misc/mke2fs.c