[Dovecot] AIX and posix_fallocate

Ralf Becker beckerr at fh-trier.de
Thu Jul 30 12:24:18 EEST 2009


Hi,

AIX's implementation of posix_fallocate is a little bit, let me say,
peculiar. Attached is a patch to "fix" (=work around) this.

Without you'll see this in the logs:

Jul 28 01:17:41 trevi mail:err|error dovecot: IMAP(beckerr):
    posix_fallocate() failed: File exists
Jul 28 01:17:41 trevi mail:err|error dovecot: IMAP(beckerr):
    file_set_size() failed with mbox file
    /u/f0/rzuser/beckerr/Mail/Ham: File exists

Funny, isn't it?

This is what it should be:

Jul 28 01:17:41 trevi mail:err|error dovecot: IMAP(beckerr):
    posix_fallocate() failed: Operation not supported on socket
Jul 28 01:17:41 trevi mail:err|error dovecot: IMAP(beckerr):
    file_set_size() failed with mbox file
    /u/f0/rzuser/beckerr/Mail/Ham: Operation not supported on socket

The problem is, that errno is not correcly set, when posix_fallocate
returns EOPNOTSUPP (="Operation not supported on socket"). In this
case the return code has to be checked rather than errno.

When patched dovecot handles err==EOPNOTSUPP the same way like
errno==EINVAL on Solaris.


A note for all AIX Admins:
Without APAR
  IZ48778: POSIX_FALLOCATE() FAILS WITH ERROR-25(ENOTTY) resp.
  IZ46961: POSIX_FALLOCATE() FAILS WITH ERROR-25(ENOTTY)
           APPLIES TO AIX 5300-06
you don't even get EOPNOTSUPP: posix_fallocate fails with NOTTY.
So you have to install one of this fixes to make the patch work.

Ralf

-- 
______________________________________________________________________

 Dipl.-Inform. (FH) Ralf Becker     Rechenzentrum (r/ft) der FH Trier
 (Network|Mail|Web|Firewall)           University of applied sciences
 Administrator                           Schneidershof, D-54293 Trier

   Mail: beckerr at fh-trier.de                    Fon: +49 651 8103 499
    Web: http://www.fh-trier.de/~beckerr        Fax: +49 651 8103 214
 PubKey: http://www.fh-trier.de/~beckerr     Crypto: GnuPG, S/MIME
______________________________________________________________________

 Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden,
 endeten Gebete traditionell mit </amen>. (Tom Listen)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dovecot-aix-posix_fallocate.patch
Url: http://dovecot.org/pipermail/dovecot/attachments/20090730/27a87d45/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6074 bytes
Desc: S/MIME Cryptographic Signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20090730/27a87d45/attachment.bin 


More information about the dovecot mailing list