[master] 2909721 Remove the 80% file system free space check

Martin Blix Grydeland martin at varnish-software.com
Tue Oct 21 12:25:42 CEST 2014


commit 29097215caf53e30e77ccdee17b9fe9317e722f8
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 a86d57e..e30cbcc 100644
--- a/bin/varnishd/storage/stevedore_utils.c
+++ b/bin/varnishd/storage/stevedore_utils.c
@@ -223,11 +223,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