Re: [Exim] upgrade 3.36 -> 4.04, "sync error" ??

Top Pagina
Delete this message
Reply to this message
Auteur: David Woodhouse
Datum:  
Aan: exim-users
CC: Edgar Lovecraft
Onderwerp: Re: [Exim] upgrade 3.36 -> 4.04, "sync error" ??
ph10@??? said:
> The difference between Exim 3 and Exim 4 is that the latter contains
> some special code for improving the integrity of file handling under
> Linux. This is the comment in the code:


> /* Linux (and maybe other OS?) does not automatically sync a directory
> after an operation like rename. We therefore have to do it forcibly
> ourselves in these cases, to make sure the file is actually accessible
> on disk, as opposed to just the data being accessible from a file in
> lost+found. Linux also has O_DIRECTORY, for opening a directory. */


> It seems (from your test) that the code to do this does not work when
> the directory is NFS mounted. The call to sync the directory fails.


> Are there any Linux file system experts out there? Care to comment on
> this? Should Exim ignore the "invalid argument" error, and assume that
> that it means "directory is NFS-mounted, you can do no more"?


fsync() on an NFS directory should be a NOP under Linux -- I don't even want
to think about the possibility of it being otherwise. Hence it should
probably return zero instead of -EINVAL.

In general, I would think that it's best for Exim to assume that an error
return from fsync() meant that something went wrong, not that operations are
synchronous and the fsync() was unnecessary. Although the latter is
(currently) the case for the linux NFS client, it should probably be fixed.

In the meantime, you could argue that refusing to use a spool on NFS is a
feature rather than a bug ;)

--
dwmw2