Again and again there are posts to many mailing lists, that cifs vfs is handling timestamps improperly. Regarding legacy servers, special copy operations just fail. (the todays smbfs vs. cifs legacy problem) Test environment: - latest git cifs vfs is mounted against - winNT - WinXP - OS/2 - Win98SE Unfortunately, this one cannot be simply explained in 3 words ... ---------------------------- To make it as clear as possible - the mount commands: ***************************************************** WinNT server: ============= mount -t cifs //wrkgk/test /mnt/winnt -o cred=/root/sec/sec_gk,dir_mode=0775,file_mode=0764,uid=gk,gid=users WinXP server: ============= mount -t cifs //cboyer/gk /mnt/winxp -o cred=/root/sec/sec_gk,dir_mode=0775,file_mode=0764,uid=gk,gid=users OS/2 server: ============ mount -t cifs //server01/CIFS /mnt/server -o cred=/root/sec/sec_gk,sec=lanman,servern=SERVER01,port=139,dir_mode=0775,file_mode=0764,uid=gk,gid=users Win98SE: ======== mount -t cifs //win98/CIFS /mnt/win9x -o cred=/root/sec/sec_gk,servern=WIN98,dir_mode=0775,file_mode=0764,uid=gk,gid=users ------------------------------------------------------ The results of "cp -p local_file /mnt/some_server": *************************************************** NOTE: cp -p src dst the '-p' option should preserve time stamps - at least the last modification time! WinNT: ====== gk@linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/winnt/ && sleep 1 && stat /mnt/winnt/dummy.tst File: `dummy.tst' Size: 51078 Blocks: 104 IO Block: 4096 regular file Device: 306h/774d Inode: 1054939 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users) Access: 2008-07-09 04:32:26.000000000 +0200 Modify: 2007-05-07 21:52:40.000000000 +0200 Change: 2008-07-09 04:32:24.000000000 +0200 File: `/mnt/winnt/dummy.tst' Size: 51078 Blocks: 104 IO Block: 16384 regular file Device: 10h/16d Inode: 11749 Links: 1 Access: (0764/-rwxrw-r--) Uid: ( 1000/ gk) Gid: ( 100/ users) Access: 2008-07-09 04:35:06.854217400 +0200 !!!!!!!!!!!!!!!!!!!!! Modify: 2008-07-09 04:35:06.794122600 +0200 !!!!!!!!!!!!!!!!!!!!! Change: 2008-07-09 04:35:06.794122600 +0200 !!!!!!!!!!!!!!!!!!!!! WinXP: ====== gk@linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/winxp/ && sleep 1 && stat /mnt/winxp/dummy.tst File: `dummy.tst' Size: 51078 Blocks: 104 IO Block: 4096 regular file Device: 306h/774d Inode: 1054939 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users) Access: 2008-07-09 04:32:24.000000000 +0200 !!!!!!!!!!!!!!!!!!!!!!!! Modify: 2007-05-07 21:52:40.000000000 +0200 !!!!!!!!!!!!!!!!!!!!!!!! Change: 2008-07-09 04:32:24.000000000 +0200 !!!!!!!!!!!!!!!!!!!!!!!! File: `/mnt/winxp/dummy.tst' Size: 51078 Blocks: 104 IO Block: 16384 regular file Device: 11h/17d Inode: 11484 Links: 1 Access: (0764/-rwxrw-r--) Uid: ( 1000/ gk) Gid: ( 100/ users) Access: 2008-07-09 04:31:31.012852800 +0200 Modify: 2008-07-09 04:31:31.012852800 +0200 Change: 2008-07-09 04:31:31.012852800 +0200 OS/2: ===== gk@linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/server/ && sleep 1 && stat /mnt/server/dummy.tst File: `dummy.tst' Size: 51078 Blocks: 104 IO Block: 4096 regular file Device: 306h/774d Inode: 1054939 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users) Access: 2008-07-09 04:46:16.000000000 +0200 Modify: 2007-05-07 21:52:40.000000000 +0200 Change: 2008-07-09 04:32:24.000000000 +0200 cp: preserving times for `/mnt/server/dummy.tst': Invalid argument Win98SE: ======== gk@linux700:~/cifstest> stat dummy.tst && cp -p dummy.tst /mnt/win9x/ && sleep 1 && stat /mnt/win9x/dummy.tst File: `dummy.tst' Size: 51078 Blocks: 104 IO Block: 4096 regular file Device: 306h/774d Inode: 1054939 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ gk) Gid: ( 100/ users) Access: 2008-07-09 04:36:04.000000000 +0200 Modify: 2007-05-07 21:52:40.000000000 +0200 Change: 2008-07-09 04:32:24.000000000 +0200 cp: preserving times for `/mnt/win9x/dummy.tst': Invalid argument ----------------------------------------------------------------- Conclusion: =========== WinNT and WinXP just _silently_ FAIL! OS/2 and Win98SE just fail with an error msg! All this is "a known cifs failure" for weeks now - Jeff Layton has prepared a (large) patch to "cleanup the cifs_setattr()" stuff - and I'm waiting to post more legacy functionality. ... but nothing happens ... A really sad situation, when realizing that even the samba smbfs helpers smbmount, smbmnt and smbumount have now been removed in 3.2.x. Cheers, Günter
*** Bug 5600 has been marked as a duplicate of this bug. ***
The version of this fix for reasonably current Windows servers has been reviewed, tested and integrated into 2.6.27 kernel (and some of the cifs backports to older kernels will likely include this although it is a big change with some of the changes to rewrite setattr that went with this). Windows95 and OS/2 would need additional changes to support this.
Please reopen or create new one if narrower problem found - but this has been fixed for multiple years now.