Alfred Perlstein wrote:
> 
> * Andre Oppermann <[EMAIL PROTECTED]> [010206 12:58] wrote:
> > Alfred Perlstein wrote:
> > >
> > > Basically, you want a fsync right before the IPC.  This should
> > > bring the metadata up to date with what's in-core and you should
> > > then be safe when you reply with your 250 accepted message.
> >
> > Like this (from qmail-queue):
> >
> > ...
> >  if (fsync(intdfd) == -1) die_write();
> >
> >  if (link(intdfn,todofn) == -1) die(66);
> >
> >  triggerpull();
> >  die(0);
> > }
> >
> > Actually for initial queueing it doesn't even unlink() but leaves
> > it to the next program. Can't be more safe, can it?
> 
> Only if you don't need the link() to exist after a crash.

No, I don't. It'll do a roll-forward.

-- 
Andre


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to