[4.0] a710884 Remove the 80% file system free space check
Lasse Karstensen
lkarsten at varnish-software.com
Thu Jan 15 16:35:41 CET 2015
commit a710884ba3076c45be2f092983a19176dde908a8
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Mon Oct 6 15:14:37 2014 +0200
Remove the 80% file system free space check
This check never worked as intended for several reasons:
- Didn't take the existing file size into account, causing it to
succeed on first startup but fail on next
- Sparse files were not handled, and can't be handled as we don't know
where in the file a hole could be and whether truncation actually
would change the number of blocks used at all
Fixes: #1343
diff --git a/bin/varnishd/storage/stevedore_utils.c b/bin/varnishd/storage/stevedore_utils.c
index ace90af..1cd890c 100644
--- a/bin/varnishd/storage/stevedore_utils.c
+++ b/bin/varnishd/storage/stevedore_utils.c
@@ -230,11 +230,6 @@ STV_FileSize(int fd, const char *size, unsigned *granularity, const char *ctx)
if (i)
fprintf(stderr, "WARNING: (%s) file size reduced"
" to %ju due to system \"off_t\" limitations\n", ctx, l);
- else if (l - st.st_size > fssize) {
- l = fssize * 80 / 100;
- fprintf(stderr, "WARNING: (%s) file size reduced"
- " to %ju (80%% of available disk space)\n", ctx, l);
- }
if (sizeof(void *) == 4 && l > INT32_MAX) { /*lint !e506 !e774 !e845 */
fprintf(stderr,
More information about the varnish-commit
mailing list