Wietse's response to Steve Lord's reply
----- Forwarded message from Wietse Venema <wietse@xxxxxxxxxxxxx> -----
Subject: Re: XFS semantics for postfix queues
To: Yusuf Goolamabbas <yusufg@xxxxxxxxxxxx>
Date: Wed, 30 Jul 2003 22:02:36 -0400 (EDT)
Cc: postfix-users@xxxxxxxxxxx
From: wietse@xxxxxxxxxxxxx (Wietse Venema)
Postfix requires that fsync() updates the directory AND file before
it returns.
Postfix with maildir also requires that link() completes all updates
before it returns.
Postfix requires that rename() updates directories safely so that
one instance of the file will always exist, even if the system
should crash in the middle of the operation. With old ext2fs the
file could end up in lost+found, this is not acceptable.
The text below does not confirm that rename()/link() work as
required. It would be incorrect to assume that every rename()/link()
operation is followed by fsync().
Wietse
Yusuf Goolamabbas:
> I asked on the XFS list whether XFS offered the appropiate semantics
> (similar to ffs/softupdate and ext3 (ordered,data=journal) to be
> reliable as a postfix queue. This is Steve Lord's (XFS lead) response
>
> Wietse, any comments ? Does it satisfy your criterion for the right
> semantics
>
> ----- Forwarded message from Steve Lord <lord@xxxxxxx> -----
>
> Subject: Re: Does XFS do the right thing for MTA queues
> From: Steve Lord <lord@xxxxxxx>
> To: Yusuf Goolamabbas <yusufg@xxxxxxxxxxxx>
> Cc: linux-xfs@xxxxxxxxxxx
>
> On Tue, 2003-07-29 at 23:25, Yusuf Goolamabbas wrote:
> > In general, MTA's like (qmail/postfix) and their authors assume the
> > BSD ffs/softupdates semantics that fsync on a file also syncs the
> > directory metadata (I think they want link/rename to be
> > synchronous). This semantic is also provided by ext3 in 2 of its modes
> > (ordered,data=journal). My question is
> >
> > a) Does XFS provide similar semantics which would make it reliable as
> > a filesystem for MTA queue ?
>
> If you do fsync on a file then the log will get pushed to disk - at
> least upto the last transaction involving the inode you do fsync on.
> This means that any transaction prior to that (such as a rename or
> a link call) is also flushed to disk. So fsync does the right thing.
>
> > b) Are there any mount options which one has to enable this behaviour
> > ?
>
> Nope. If you are really paranoid, the wsync mount option makes almost
> all transactions synchronous.
>
> > Also, what's the version of XFS in the Alan Cox 2.4.22-pre6-ac1 kernel
> >
>
> It is somewhat long in the tooth now, and probably has some issues
> with the O_DIRECT path.
>
> Steve
> ----- End forwarded message -----
>
> --
> If you're not using Firebird, you're not surfing the web
> you're suffering it
> http://www.mozilla.org/products/firebird/why/
>
>
----- End forwarded message -----
--
If you're not using Firebird, you're not surfing the web
you're suffering it
http://www.mozilla.org/products/firebird/why/
|