Auteur: Nigel Metheringham Date: À: Andrew C Aitchison CC: Jeremy Harris, exim-users Sujet: Re: [exim] Exim, Dovecot, mdir and hardlinks - a true story
Would not taking the quota size of a message as being the file size /
link count be good enough?
If there are links between users then this will underestimate the size
of a maildir structure, but in general it would be right.
But it does force a stat() call which the put everything in the name as
tags was designed to avoid - we used to really want that way back in the
days of huge numbers of users with NFS mounted mailboxes in late 90's ISPs.
Nigel.
Andrew C Aitchison via Exim-users wrote on 14/08/2019 16:48: > On Wed, 14 Aug 2019, Jeremy Harris via Exim-users wrote:
>
>> On 14/08/2019 12:37, Andrew C Aitchison via Exim-users wrote:
>>> I suspect an option to have a fast but inaccurate quota would be useful
>>> in some circumstances.
>>
>> We already have maildir_use_size_file; rebuilding isn't needed often.
>>
>> Do we need a fast/poor quota method for cases where the size-file
>> cannot be used?
>
> Ah. I had missed that Cyborg is using maildir format (I'm used to mbox).
>
>> Other possible ways of balancing: we currently glance at the filename,
>> trying to pull a size encoded in it. That saves an additional per-file
>> stat call to get the size. But without the stat we don't have an
>> inode number... we can hash the filename, but that only works if
>> a hardlink is to a different dir but with the same name. We could
>> glance at the number of links, and only bother remembering >1 link
>> nodes - but, again, we then need to do the stat call.
>
> From the introduction to "Chapter 26 - The appendfile transport":
> Exim recognizes system quota errors, and generates an appropriate
> message. Exim also supports its own quota control within the transport,
> for use when the system facility is unavailable or cannot be used
> for some reason.
>
> Now I think about it I've not (knowingly) used both on the same
> filesystem.
> I also now realize that the INBOX and the files that a .forward file
> redirects mail to may be on different disks and have different quotas ...
>