I did a little research on the Reiser mailing list.  I realized that the
error was happening because of the Reiser patch I installed.  This code that
was failing was not in the original qmail source.

It appears that because of qmails speed at sending out mails, the link that
is made by:

if (link(intdfn,todofn) == -1) die(66);

at the end of qmail-queue.c is gone because the mail gets sent before the
code from the Reiser Patch can fsync it.  I know I still need the fsync, but
I am not going to be worried about the error if the link cannot be fsync'ed
since it is most likely gone because it has been sent.

So I changed the code from the patch:

 if ((fd = open(todofn, O_RDONLY)) >= 0
    || fsync(fd || close(fd)) die(66);

to:

 /* fsync the data on ReiserFS drives */
 if ((fd = open(todofn, O_RDONLY)) >= 0 )
  {
   fsync(fd);
   close(fd);
  }

Now, I get no errors.

Brian Moon
------------------------------------------
dealnews.com, Inc.
Makers of dealnews & dealmac
http://dealnews.com/ | http://dealmac.com/



Reply via email to