dovecot-1.2: Maildir saving: Handle "out of disk space/quota" fa...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Nov 6 15:33:59 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/b9e34721e74c
changeset: 8389:b9e34721e74c
user: Timo Sirainen <tss at iki.fi>
date: Thu Nov 06 15:33:53 2008 +0200
description:
Maildir saving: Handle "out of disk space/quota" failures in fsync() and close().
Those failures could happen with NFS (close() only if fsync_disable=yes).
diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
src/lib-storage/index/maildir/maildir-save.c | 10 +++++++---
diffs (25 lines):
diff -r 4a608f96609b -r b9e34721e74c src/lib-storage/index/maildir/maildir-save.c
--- a/src/lib-storage/index/maildir/maildir-save.c Wed Nov 05 20:03:05 2008 +0200
+++ b/src/lib-storage/index/maildir/maildir-save.c Thu Nov 06 15:33:53 2008 +0200
@@ -496,14 +496,18 @@ static int maildir_save_finish_real(stru
if (!ctx->mbox->ibox.fsync_disable && !ctx->failed) {
if (fsync(ctx->fd) < 0) {
- mail_storage_set_critical(storage,
+ if (!mail_storage_set_error_from_errno(storage)) {
+ mail_storage_set_critical(storage,
"fsync(%s) failed: %m", path);
+ }
ctx->failed = TRUE;
}
}
if (close(ctx->fd) < 0) {
- mail_storage_set_critical(storage,
- "close(%s) failed: %m", path);
+ if (!mail_storage_set_error_from_errno(storage)) {
+ mail_storage_set_critical(storage,
+ "close(%s) failed: %m", path);
+ }
ctx->failed = TRUE;
}
ctx->fd = -1;
More information about the dovecot-cvs
mailing list