]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
mke2fs: fix bugs in hugefile creation
authorTheodore Ts'o <tytso@mit.edu>
Fri, 25 Jan 2019 03:35:15 +0000 (22:35 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 25 Jan 2019 04:18:11 +0000 (23:18 -0500)
commitf6c50d68cc044422f4f38b7c8be892527d66e10d
treeaeb8be626edbbfb4c1c7c377682af3f3ce0a80af
parentc3749cad154ace57ef3c23a950fbaf44c7ad8a3b
mke2fs: fix bugs in hugefile creation

For certain sizes mke2fs's hugefile creation would fail with the error:

mke2fs: Could not allocate block in ext2 filesystem while creating huge file 0

This would happen because we had failed to reserve enough space for
the metadata blocks for the hugefile.  There were two problems:

1) The overhead calculation function failed to take into account the
cluster size for bigalloc file systems.

2) In the case where num_blocks is 0 and num_files is 1, the overhead
calculation function was passed a size of 0, which caused the
calculated overhead to be zero.

Google-Bug-Id: 123239032
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mk_hugefiles.c