[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dovecot
Subject:    [Dovecot] Non-blocking file_dotlock_open() in quota-maildir question
From:       do1 () yandex ! ru
Date:       2013-07-08 18:42:08
Message-ID: 120481373308928 () web17d ! yandex ! ru
[Download RAW message or body]

Hello,

Is it safe to change lines in plugins/quota/quota-maildir.c::maildirsize_write() from
š fd = file_dotlock_open_group(.., DOTLOCK_CREATE_FLAG_NONBLOCK, ..);
to
š fd = file_dotlock_open_group(.., 0, ..); ?

Rationale is: exim+cpanel frequently leave stale maldirsize.lock, but when quota \
plugin try to dotlock maildirsize, it do this with NONBLOCK flag and just once, so \
first lock fails with EAGAIN and second may never happen. (When last mail is over \
quota this also prevent user from further receiving any mail because quota remain \
exceeded, forver. This is annoing problem.) I wonder if it is possible to do easy fix \
problem by removing NONBLOCK flag, but as I don't understand why this NONBLOCK flag \
is used in the first place I decided to ask developers in the list for approval.

If removing NONBLOCK flag is not possible I will just call file_dotlock_open_group() \
twice if first one return -1 with EAGAIN.

Best regards,
Don.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic