diff options
Diffstat (limited to 'src/kvstorage_file.c')
-rw-r--r-- | src/kvstorage_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kvstorage_file.c b/src/kvstorage_file.c index 154ccf279..73e5a8a88 100644 --- a/src/kvstorage_file.c +++ b/src/kvstorage_file.c @@ -142,6 +142,7 @@ file_open_fd (const gchar *path, gsize *len, gint flags) if ((flags & O_CREAT) != 0) { /* Open file */ if ((fd = open (path, flags, S_IRUSR|S_IWUSR|S_IRGRP)) != -1) { + rspamd_fallocate (fd, 0, *len); #ifdef HAVE_FADVISE posix_fadvise (fd, 0, *len, POSIX_FADV_SEQUENTIAL); #endif |