Maildir saving: Handle "out of disk space/quota" failures in fsync().
authorTimo Sirainen <tss@iki.fi>
Thu Nov 06 15:35:37 2008 +0200 (7 months ago)
changeset 55709879434a6339
manifest9879434a6339
parent 5569e19d44320065
tagtip
Maildir saving: Handle "out of disk space/quota" failures in fsync().
src/lib-storage/index/maildir/maildir-save.c
--- a/src/lib-storage/index/maildir/maildir-save.c Thu Oct 23 18:59:00 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-save.c Thu Nov 06 15:35:37 2008 +0200
@@ -410,8 +410,13 @@ int maildir_save_finish(struct mail_save
if (!ctx->mbox->ibox.fsync_disable) {
if (fsync(ctx->fd) < 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
- "fsync(%s) failed: %m", path);
+ if (ENOSPACE(errno)) {
+ mail_storage_set_error(STORAGE(ctx->mbox->storage),
+ "Not enough disk space");
+ } else {
+ mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ "fsync(%s) failed: %m", path);
+ }
ctx->failed = TRUE;
}
}