]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix error logging for failing to create .vsize.lock
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 21 Jun 2017 22:56:18 +0000 (01:56 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 3 Jul 2017 12:14:13 +0000 (15:14 +0300)
src/lib-storage/index/index-mailbox-size.c

index 85211584ab23f1f2116b45fd2d0183e17517de32..19a5051f98c16512d9268b09f91bd780929f8af1 100644 (file)
@@ -150,9 +150,12 @@ static bool vsize_update_lock_full(struct mailbox_vsize_update *update,
        update->lock_fd = file_create_locked(update->lock_path, &set,
                                             &update->lock, &created, &error);
        if (update->lock_fd == -1) {
+               /* don't log lock timeouts, because we're somewhat expecting
+                  them. Especially when lock_secs is 0. */
                if (errno != EAGAIN) {
-                       i_error("file_create_locked(%s) failed: %m",
-                               update->lock_path);
+                       mail_storage_set_critical(box->storage,
+                               "file_create_locked(%s) failed: %s",
+                               update->lock_path, error);
                }
                return FALSE;
        }