Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
e2fsprogs
resize2fs-Check-number-of-group-descriptors-onl...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File resize2fs-Check-number-of-group-descriptors-only-if-.patch of Package e2fsprogs
From 6223d779b4aa1733af2d7a7585a1c962475b5745 Mon Sep 17 00:00:00 2001 From: Jan Kara <jack@suse.cz> Date: Wed, 25 Sep 2024 19:06:03 +0200 Subject: [PATCH] resize2fs: Check number of group descriptors only if meta_bg is disabled When meta_bg feature is enabled, the total number of group descriptors is not really limiting the filesystem size. So there's no reason to check it in that case. This allows resize2fs to resize filesystems past 256TB boundary similarly as the kernel can do it. Signed-off-by: Jan Kara <jack@suse.cz> --- resize/main.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) Index: e2fsprogs-1.46.4/resize/main.c =================================================================== --- e2fsprogs-1.46.4.orig/resize/main.c +++ e2fsprogs-1.46.4/resize/main.c @@ -269,8 +269,6 @@ int main (int argc, char ** argv) long sysval; int len, mount_flags; char *mtpt, *undo_file = NULL; - dgrp_t new_group_desc_count; - unsigned long new_desc_blocks; #ifdef ENABLE_NLS setlocale(LC_MESSAGES, ""); @@ -537,17 +535,23 @@ int main (int argc, char ** argv) goto errout; } } - new_group_desc_count = ext2fs_div64_ceil(new_size - - fs->super->s_first_data_block, - EXT2_BLOCKS_PER_GROUP(fs->super)); - new_desc_blocks = ext2fs_div_ceil(new_group_desc_count, - EXT2_DESC_PER_BLOCK(fs->super)); - if ((new_desc_blocks + fs->super->s_first_data_block) > - EXT2_BLOCKS_PER_GROUP(fs->super)) { - com_err(program_name, 0, - _("New size results in too many block group " - "descriptors.\n")); - goto errout; + + if (!ext2fs_has_feature_meta_bg(fs->super)) { + dgrp_t new_group_desc_count; + unsigned long new_desc_blocks; + + new_group_desc_count = ext2fs_div64_ceil(new_size - + fs->super->s_first_data_block, + EXT2_BLOCKS_PER_GROUP(fs->super)); + new_desc_blocks = ext2fs_div_ceil(new_group_desc_count, + EXT2_DESC_PER_BLOCK(fs->super)); + if ((new_desc_blocks + fs->super->s_first_data_block) > + EXT2_BLOCKS_PER_GROUP(fs->super)) { + com_err(program_name, 0, + _("New size results in too many block group " + "descriptors.\n")); + goto errout; + } } if (!force && new_size < min_size) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor