]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
resize2fs: take s_first_data_block into account for resize2fs -M
authorJan Kara <jack@suse.cz>
Wed, 15 Feb 2012 23:41:33 +0000 (18:41 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Feb 2012 19:32:18 +0000 (14:32 -0500)
commitba8bfa1a6dca8a6b65c6c938f3848e90e26bbe09
tree161e74571cc3049eab66ede301307536615b6262
parent910fae94a5799de1fdfd180df55ef4d71319e0b7
resize2fs: take s_first_data_block into account for resize2fs -M

calculate_minimum_resize_size() forgot to account s_first_data_block
into minimum filesystem size. Thus in case the size of filesystem was
such that the last group had the minimal size (50 blocks + metadata
overhead), the code in adjust_fs_info() decided the group is unneeded,
removed it, and in some cases the resizing then failed with ENOSPC.

Fix the issue by properly accounting for s_first_data_block in
calculate_minimum_resize_size().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
resize/resize2fs.c