Re: cyrus 2.3.8, internal dates not stored in message file time ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/22/07, David Carter <dpc22@xxxxxxxxx> wrote:
> On Thu, 21 Jun 2007, Nicolas KOWALSKI wrote:
>
> > I have noticed that copying messages from one folder to another one does
> > keep messages internal dates but does not set message files write time
> > in the destination folder, as 2.2.12 does.
>
> mailbox_copyfile() hasn't changed between 2.2.12 and 2.3.8.
>
> If source and target mailbox are on the same partition then the message
> should be copied using link(): both hard links share a single timestamp.
> Otherwise Cyrus has to create a new file and copy the data by hand.

The source and target mailboxes are on the same user account, same
partition, but strace shows that link is not used in 2.3.8. The
following traces are obtained with strace, when copying messages from
testbox to testbox3 with cyrus 2.2.12 and to testbox4 with cyrus
2.3.8. In both case, I used the same configuration/mailstore/client:

- cyrus 2.2.12:

select(1, [0], NULL, NULL, {1789, 316000}) = 1 (in [0], left {1779, 580000})
time(NULL)                              = 1182528401
read(0, "01000012 COPY 1:331 testbox3\r\n", 4096) = 30
fcntl64(6, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(6, {st_mode=S_IFREG|0600, st_size=4620, ...}) = 0
stat64("/var/imap/mailboxes.db", {st_mode=S_IFREG|0600, st_size=4620, ...}) = 0
fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
open("/var/imap/spool/user/niko/testbox3/cyrus.header", O_RDWR) = 15
fstat64(15, {st_mode=S_IFREG|0600, st_size=166, ...}) = 0
mmap2(NULL, 166, PROT_READ, MAP_SHARED, 15, 0) = 0xb7ba0000
fcntl64(15, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(15, {st_mode=S_IFREG|0600, st_size=166, ...}) = 0
stat64("/var/imap/spool/user/niko/testbox3/cyrus.header",
{st_mode=S_IFREG|0600, st_size=1
66, ...}) = 0
open("/var/imap/spool/user/niko/testbox3/cyrus.index", O_RDWR) = 16
fstat64(16, {st_mode=S_IFREG|0600, st_size=76, ...}) = 0
mmap2(NULL, 16384, PROT_READ, MAP_SHARED, 16, 0) = 0xb7b5a000
open("/var/imap/spool/user/niko/testbox3/cyrus.cache", O_RDWR) = 17
fstat64(17, {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
mmap2(NULL, 16384, PROT_READ, MAP_SHARED, 17, 0) = 0xb7b4b000
fstat64(16, {st_mode=S_IFREG|0600, st_size=76, ...}) = 0
fcntl64(16, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(16, {st_mode=S_IFREG|0600, st_size=76, ...}) = 0
stat64("/var/imap/spool/user/niko/testbox3/cyrus.index",
{st_mode=S_IFREG|0600, st_size=76
, ...}) = 0
fstat64(16, {st_mode=S_IFREG|0600, st_size=76, ...}) = 0
lseek(17, 0, SEEK_END)                  = 4
time(NULL)                              = 1182528401
link("1.", "/var/imap/spool/user/niko/testbox3/1.") = 0
lseek(17, 0, SEEK_CUR)                  = 4
write(17, "\0\0\1B(\"Sun, 3 Oct 2004 15:55:14 +"..., 1820) = 1820
time(NULL)                              = 1182528401
link("2.", "/var/imap/spool/user/niko/testbox3/2.") = 0
lseek(17, 0, SEEK_CUR)                  = 1824
write(17, "\0\0\1/(\"Mon, 27 Dec 2004 09:19:05 "..., 1288) = 1288
time(NULL)                              = 1182528401
link("3.", "/var/imap/spool/user/niko/testbox3/3.") = 0
lseek(17, 0, SEEK_CUR)                  = 3112
write(17, "\0\0\1a(\"Sat, 1 Jan 2005 04:01:30 +"..., 1684) = 1684


- cyrus 2.3.8:

read(0, "01000006 COPY 1:331 testbox4\r\n", 4096) = 30
fcntl64(6, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(6, {st_mode=S_IFREG|0600, st_size=4820, ...}) = 0
stat64("/var/imap/mailboxes.db", {st_mode=S_IFREG|0600, st_size=4820, ...}) = 0
fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
brk(0x81a0000)                          = 0x81a0000
brk(0x818f000)                          = 0x818f000
fcntl64(6, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(6, {st_mode=S_IFREG|0600, st_size=4820, ...}) = 0
stat64("/var/imap/mailboxes.db", {st_mode=S_IFREG|0600, st_size=4820, ...}) = 0
fcntl64(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
open("/var/imap/spool/user/niko/testbox4/cyrus.header", O_RDWR) = 14
fstat64(14, {st_mode=S_IFREG|0600, st_size=166, ...}) = 0
mmap2(NULL, 166, PROT_READ, MAP_SHARED, 14, 0) = 0xb79a6000
fcntl64(14, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(14, {st_mode=S_IFREG|0600, st_size=166, ...}) = 0
stat64("/var/imap/spool/user/niko/testbox4/cyrus.header",
{st_mode=S_IFREG|0600, st_size=1
66, ...}) = 0
open("/var/imap/spool/user/niko/testbox4/cyrus.index", O_RDWR) = 15
fstat64(15, {st_mode=S_IFREG|0600, st_size=96, ...}) = 0
mmap2(NULL, 16384, PROT_READ, MAP_SHARED, 15, 0) = 0xb79a2000
open("/var/imap/spool/user/niko/testbox4/cyrus.cache", O_RDWR) = 16
fstat64(16, {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
mmap2(NULL, 16384, PROT_READ, MAP_SHARED, 16, 0) = 0xb799e000
fstat64(15, {st_mode=S_IFREG|0600, st_size=96, ...}) = 0
fcntl64(15, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat64(15, {st_mode=S_IFREG|0600, st_size=96, ...}) = 0
stat64("/var/imap/spool/user/niko/testbox4/cyrus.index",
{st_mode=S_IFREG|0600, st_size=96
, ...}) = 0
fstat64(15, {st_mode=S_IFREG|0600, st_size=96, ...}) = 0
lseek(16, 0, SEEK_END)                  = 4
brk(0x81b3000)                          = 0x81b3000
time(NULL)                              = 1182528543
open("/var/imap/spool/user/niko/testbox4/1.", O_RDWR|O_CREAT|O_TRUNC, 0666) = 17
open("/var/imap/spool/user/niko/testbox/1.", O_RDONLY) = 18
fstat64(18, {st_mode=S_IFREG|0600, st_size=10179, ...}) = 0
mmap2(NULL, 10179, PROT_READ, MAP_SHARED, 18, 0) = 0xb799b000
write(17, "Return-Path: <nkowalski@club-int"..., 10179) = 10179
fsync(17)                               = 0
munmap(0xb799b000, 10179)               = 0
close(18)                               = 0
close(17)                               = 0
lseek(16, 0, SEEK_CUR)                  = 4
write(16, "\0\0\1B(\"Sun, 3 Oct 2004 15:55:14 +"..., 1820) = 1820
time(NULL)                              = 1182528543
open("/var/imap/spool/user/niko/testbox4/2.", O_RDWR|O_CREAT|O_TRUNC, 0666) = 17
open("/var/imap/spool/user/niko/testbox/2.", O_RDONLY) = 18
fstat64(18, {st_mode=S_IFREG|0600, st_size=3084, ...}) = 0
mmap2(NULL, 3084, PROT_READ, MAP_SHARED, 18, 0) = 0xb799d000
write(17, "Return-Path: <nkowalski@club-int"..., 3084) = 3084
fsync(17)                               = 0
munmap(0xb799d000, 3084)                = 0
close(18)                               = 0
close(17)                               = 0
lseek(16, 0, SEEK_CUR)                  = 1824
write(16, "\0\0\1/(\"Mon, 27 Dec 2004 09:19:05 "..., 1288) = 1288
time(NULL)                              = 1182528543
open("/var/imap/spool/user/niko/testbox4/3.", O_RDWR|O_CREAT|O_TRUNC, 0666) = 17
open("/var/imap/spool/user/niko/testbox/3.", O_RDONLY) = 18
fstat64(18, {st_mode=S_IFREG|0600, st_size=3865, ...}) = 0
mmap2(NULL, 3865, PROT_READ, MAP_SHARED, 18, 0) = 0xb799d000
write(17, "Return-Path: <nkowalski@club-int"..., 3865) = 3865
fsync(17)                               = 0
munmap(0xb799d000, 3865)                = 0
close(18)                               = 0
close(17)                               = 0
lseek(16, 0, SEEK_CUR)                  = 3112
write(16, "\0\0\1a(\"Sat, 1 Jan 2005 04:01:30 +"..., 1684) = 1684
time(NULL)                              = 1182528543


There must be something really wrong in my configuration...

-- 
Nicolas
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux