diff options
author | Guillem Jover <guillem@debian.org> | 2017-01-26 13:44:31 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2017-01-26 23:26:32 +0100 |
commit | 9d5e55d449a32a70158c81314649d312babd2684 (patch) | |
tree | 58a865033fbeb40b3aaa9e2e762e5880b6900922 /lib | |
parent | c8153b8c748278098c3e87f966a8194b5825ad88 (diff) | |
download | dpkg-9d5e55d449a32a70158c81314649d312babd2684.tar.gz |
build: Disable disk pre-allocation by default
Contrary to what one would expect, this seems to be causing major issues
in several "modern" filesystems, as it collides with the heuristics and
optimizations that these try to perform.
Disable this by default, but let the builder enable it again in case
this is not a problem on certain systems.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dpkg/fdio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/dpkg/fdio.c b/lib/dpkg/fdio.c index b98596e2b..8e61b5d88 100644 --- a/lib/dpkg/fdio.c +++ b/lib/dpkg/fdio.c @@ -77,6 +77,7 @@ fd_write(int fd, const void *buf, size_t len) return total; } +#ifdef USE_DISK_PREALLOCATE #ifdef HAVE_F_PREALLOCATE static void fd_preallocate_setup(fstore_t *fs, int flags, off_t offset, off_t len) @@ -152,3 +153,11 @@ fd_allocate_size(int fd, off_t offset, off_t len) return rc; } +#else +int +fd_allocate_size(int fd, off_t offset, off_t len) +{ + errno = ENOSYS; + return -1; +} +#endif |