Skip to content
Commit 87b0b20b authored by Guillem Jover's avatar Guillem Jover
Browse files

dpkg: Try to preallocate the disk size for extracted files

This might help in avoiding filesystem fragmentation, and possibly
improve performance on some filesystems.

We use the system specific methods if available, and only use
posix_fallocate() if nothing else is available, because on some systems
its semantics are counter to what we want to obtain here, as the libc
library will fallback to manually writing '\0' to each block to force
the preallocation, instead of just failing and leaving the application
to do so if desired.
parent 101e5bea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment