lkml.org 
[lkml]   [2004]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectreaddir loses renamed files
Date
I'd have thought this had already been asked many times before, but 
google didn't show me anything.

My problem is that mails in a large maildir get temporarily lost. This
happens because readdir() never returns a file which was just rename()d
by another process. Either new or the old name would have been fine,
but it's not returned at all.

Is there a chance this could get fixed? Every OS/filesystem I've tested
so far has had the same problem, so I'll have to implement some extra
locking anyway (so much for maildir being lockless), but it would be
nice to have at least one OS where it works without the extra locking
overhead.

I have a test program if someone wants to try it:
http://dovecot.org/tmp/readdir.c

(and please Cc replies)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2011 Jasper Spaans