3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #91214 from flokli/make-ext4-fs-fudge-factor

nixos/make-ext4-fs: increase fudge factor from 1.03 to 1.10
This commit is contained in:
Florian Klink 2020-06-21 22:13:12 +02:00 committed by GitHub
commit 44d75efd7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@ pkgs.stdenv.mkDerivation {
# Make a crude approximation of the size of the target image.
# If the script starts failing, increase the fudge factors here.
numInodes=$(find $storePaths ./files | wc -l)
numDataBlocks=$(du -s -c -B 4096 --apparent-size $storePaths ./files | tail -1 | awk '{ print int($1 * 1.03) }')
numDataBlocks=$(du -s -c -B 4096 --apparent-size $storePaths ./files | tail -1 | awk '{ print int($1 * 1.10) }')
bytes=$((2 * 4096 * $numInodes + 4096 * $numDataBlocks))
echo "Creating an EXT4 image of $bytes bytes (numInodes=$numInodes, numDataBlocks=$numDataBlocks)"