dovecot-2.0: file_preallocate(): Don't ignore ENOSPC with OSX ei...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 22 00:59:28 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/aaca506ea33b
changeset: 12343:aaca506ea33b
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 21 22:59:26 2010 +0100
description:
file_preallocate(): Don't ignore ENOSPC with OSX either, caller will check it.

diffstat:

 src/lib/file-set-size.c |  7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diffs (18 lines):

diff -r f6e45e83796b -r aaca506ea33b src/lib/file-set-size.c
--- a/src/lib/file-set-size.c	Thu Oct 21 22:56:02 2010 +0100
+++ b/src/lib/file-set-size.c	Thu Oct 21 22:59:26 2010 +0100
@@ -98,13 +98,8 @@
 	fs.fst_offset = 0;
 	fs.fst_length = size;
 	fs.fst_bytesalloc = 0;
-	if (fcntl(fd, F_PREALLOCATE, &fs) < 0) {
-		if (errno == ENOSPC) {
-			/* can't allocate contiguous block. just forget it. */
-			return 0;
-		}
+	if (fcntl(fd, F_PREALLOCATE, &fs) < 0)
 		return -1;
-	}
 	return 0;
 #else
 	return 0;


More information about the dovecot-cvs mailing list