James Fidell
2006-Feb-16 17:15 UTC
[CentOS] jfs directory modification times in centosplus
(This is a copy of an email I've sent to the jfs-discussion list. I'm copying here in the hope that I'll get help from somewhere...) I'm running Centos 4.2 with kernel-2.6.9-22.0.2.106.unsupported and jfsutils-1.1.10-3.2 from the centosplus distribution, with a jfs partition for my maildir mail spool, accessed using the dovecot IMAP server. It seems that dovecot doesn't properly track new incoming email, apparently because the modification time on .../Maildir/new doesn't get updated when a new message is linked into it from .../Maildir/tmp. A quick manual test gives: $ mkdir a b $ cd b $ ls -al total 4 drwxr-xr-x 2 root root 1 Feb 16 15:51 . drwxr-xr-x 11 root root 72 Feb 16 15:51 .. $ touch c $ ls -la total 4 drwxr-xr-x 2 root root 8 Feb 16 15:56 . drwxr-xr-x 11 root root 72 Feb 16 15:51 .. -rw-r--r-- 1 root root 0 Feb 16 15:56 c $ ls -al ../a total 4 drwxr-xr-x 2 root root 1 Feb 16 15:51 . drwxr-xr-x 11 root root 72 Feb 16 15:51 .. $ ln c ../a $ ls -la ../a total 4 drwxr-xr-x 2 root root 8 Feb 16 15:51 . drwxr-xr-x 11 root root 72 Feb 16 15:51 .. -rw-r--r-- 2 root root 0 Feb 16 15:56 c showing that directory "a" doesn't have the modification date changed when file "c" is linked into it from "b". On an ext3 filesystem however: $ mkdir a b $ cd b ls -la total 12 drwxrwxr-x 2 james james 4096 Feb 16 17:00 . drwxrwxrwt 18 root root 4096 Feb 16 17:00 .. $ touch c $ ls -la total 12 drwxrwxr-x 2 james james 4096 Feb 16 17:01 . drwxrwxrwt 18 root root 4096 Feb 16 17:00 .. -rw-rw-r-- 1 james james 0 Feb 16 17:01 c $ ls -al ../a total 12 drwxrwxr-x 2 james james 4096 Feb 16 17:00 . drwxrwxrwt 18 root root 4096 Feb 16 17:00 .. $ ln c ../a $ ls -al ../a total 12 drwxrwxr-x 2 james james 4096 Feb 16 17:02 . drwxrwxrwt 18 root root 4096 Feb 16 17:00 .. -rw-rw-r-- 2 james james 0 Feb 16 17:01 c and the last mod date on "a" is changed. UFS on FreeBSD exhibits the same behaviour as ext3. Is this a known problem? Documented behaviour? Is there a way to get the behaviour I want? James
James Fidell
2006-Feb-16 17:30 UTC
[CentOS] jfs directory modification times in centosplus
Replying to my own email. I wrote:> I'm running Centos 4.2 with kernel-2.6.9-22.0.2.106.unsupported and > jfsutils-1.1.10-3.2 from the centosplus distribution, with a jfs > partition for my maildir mail spool, accessed using the dovecot IMAP > server. It seems that dovecot doesn't properly track new incoming email, > apparently because the modification time on .../Maildir/new doesn't get > updated when a new message is linked into it from .../Maildir/tmp.It appears the problem is fixed in 2.6.15: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=988a6490a793b73ff23aa3baf87b337152178e4d Looks like a simple change, so I may well try backporting it to the current kernel myself when I can get organised enough. Meantime a regular "find /mail -type d -name new -print | xargs touch" (euwww :) appears to do the trick. James