lkml.org 
[lkml]   [1996]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: imapd and synchronous writes
On 11 Mar 96 at 15:31, John Gardiner Myers wrote:

> fraioli@dg-rtp.dg.com (Marc J. Fraioli) writes:
> > I'm looking at the docs for CMU's cygnus IMAP server, and came
> > across the following warning in a README:
> > [...]
> > What is the reason for this?
>
> The ext2 filesystem performs directory updates asynchronously. When
> the IMAP server (or sendmail) is given a message, it will create a
> file for it, write out the contents, and fsync() it before informing
> the sender that it has accepted responsibility for the message.
>
> However, the fsync() doesn't mean a hill of beans if the directory
> entry for the file doesn't get committed to disk. If the machine

You are saying that fsync() violates the POSIX requirements. It seems
that recent POSIX has a relaxed fsync() that "only writes essential
data" to the disk. I can't remember the syscall right now. I'm rather
sure that Ted knows about it.

If fsync is broken, shouldn't it be fixed before 2.0?

> crashes before that buffer gets flushed, the message gets lost. There
> is no way the application can commit the directory change short of
> calling sync().
>
> Similarly, there are cases where the server databases can become
> inconsistent if rename() calls don't get committed to disk. There's a
> *lot* of open()/writev()/fsync()/rename() sequences in the code.
>
> These server applications absolutely depend on synchronous directory
> updates. So the directories for their databases have to be marked
> with the synchronous attribute.
>
> --
> _.John G. Myers Internet: jgm+@CMU.EDU
> LoseNet: ...!seismo!ihnp4!wiscvm.wisc.edu!give!up

------------
Ulrich Windl Klinikum der Universitaet Regensburg
Rechenzentrum DV-med Franz-Josef-Strauss-Allee 11
Tel: +49 941 944-5879 D-93053 Regensburg
FAX: +49 941 944-5882
Just imagine my mail address were <Ulrich.Windl@rz.uni.r.de>...


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.067 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site