From: Timo Sirainen Date: Wed, 21 Jun 2017 22:56:18 +0000 (+0300) Subject: lib-storage: Fix error logging for failing to create .vsize.lock X-Git-Tag: 2.3.0.rc1~1361 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99e9dc500f54366263d1de804d933030df0385a2;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Fix error logging for failing to create .vsize.lock --- diff --git a/src/lib-storage/index/index-mailbox-size.c b/src/lib-storage/index/index-mailbox-size.c index 85211584ab..19a5051f98 100644 --- a/src/lib-storage/index/index-mailbox-size.c +++ b/src/lib-storage/index/index-mailbox-size.c @@ -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; }