]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
misc: fix 'zero_hugefiles = false' regression
authorEric Biggers <ebiggers@google.com>
Mon, 8 May 2017 22:47:57 +0000 (15:47 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 8 May 2017 23:59:54 +0000 (19:59 -0400)
commite3d591eb1dfc6e03639171b120d48e8738deff04
tree1c1ed49db70e60e4b3fffc761e8eea961a7f744d
parente251f3585902919e809414a4bd17d6bfdbdaaad1
misc: fix 'zero_hugefiles = false' regression

When mk_hugefiles() was switched to use ext2fs_fallocate(), it was
accidentally changed to ignore the 'zero_hugefiles = false' setting,
which should cause hugefiles to be allocated without initializing their
contents.  Fix this by only passing EXT2_FALLOCATE_ZERO_BLOCKS to
ext2fs_fallocate() when zero_hugefiles is true.

Google-Bug-Id: 38037607
Fixes: 4f868703f6f2 ("libext2fs: use fallocate for creating journals and hugefiles")
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mk_hugefiles.c