---
 bin/varnishd/storage/storage_file.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bin/varnishd/storage/storage_file.c 
b/bin/varnishd/storage/storage_file.c
index db634f2..0102302 100644
--- a/bin/varnishd/storage/storage_file.c
+++ b/bin/varnishd/storage/storage_file.c
@@ -40,6 +40,7 @@
 #include "storage/storage.h"
 
 #include "vnum.h"
+#include "vfil.h"
 
 #ifndef MAP_NOCORE
 #define MAP_NOCORE 0 /* XXX Linux */
@@ -108,6 +109,8 @@ smf_initfile(struct smf_sc *sc, const char *size)
            "-sfile");
 
        AZ(ftruncate(sc->fd, (off_t)sc->filesize));
+       if (VFIL_fallocate(sc->fd, (off_t)sc->filesize))
+               ARGV_ERR("(-sfile) %s\n", strerror(errno));;
 
        /* XXX: force block allocation here or in open ? */
 }
-- 
2.1.1


_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to