Bug 6520 - time stamps - e.g. last mod time is not preserved when "unix extensions=yes" are set - and using latest cifs vfs client
Summary: time stamps - e.g. last mod time is not preserved when "unix extensions=yes" ...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.4.0rc1
Hardware: x86 Linux
: P3 regression
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-29 22:17 UTC by Guenter Kukkukk
Modified: 2009-07-02 01:42 UTC (History)
1 user (show)

See Also:


Attachments
debug 10 log (32.97 KB, text/plain)
2009-06-29 22:20 UTC, Guenter Kukkukk
no flags Details
wireshark sniff (3.66 KB, application/octet-stream)
2009-06-29 22:25 UTC, Guenter Kukkukk
no flags Details
Patch for master and 3.4.0 (1.61 KB, patch)
2009-06-30 21:10 UTC, Jeremy Allison
no flags Details
Patch for 3.3 and 3.2. (1.65 KB, patch)
2009-06-30 21:15 UTC, Jeremy Allison
no flags Details
new debug10 log after jra's patch applied (32.51 KB, text/plain)
2009-07-01 11:10 UTC, Guenter Kukkukk
no flags Details
Replacement patch for 3.4.0 and master (1.81 KB, patch)
2009-07-01 16:32 UTC, Jeremy Allison
no flags Details
debug10 log after jra's 2nd patch (32.50 KB, text/plain)
2009-07-01 17:10 UTC, Guenter Kukkukk
no flags Details
Replacement patch for 3.3 and 3.2. (1.85 KB, patch)
2009-07-01 18:27 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guenter Kukkukk 2009-06-29 22:17:20 UTC
we have a regression here - don't know when this one crept in.

At least when using "Version 3.4.0pre2-GIT-4368df8-test" - but i'm sure other
versions are also affected
  - (at least) last mod time is not preserved when "unix extensions = yes"

Using the most recent (git) cifs vfs module:
  cp -p srcfile /mnt/latest/samba_srv/

does _not_ preserve time stamps as it should/must do.

I already spent hours with this one - not being always sure whether it's a cifs
or samba server issue (I know think it's a server issue).

The following debug10 log and the wireshark trace was taken when using the
following mount cmd:
  mount -t cifs //server/share /mnt/tmp -o user=gk,pass=secret,noacl

Note:
I used the "noacl" option to avoid _any_ further acl interaction,
which is pointless here (allowing acls just add some additional network
frames/debug entries - not related at all here).

Cheers, Günter
Comment 1 Guenter Kukkukk 2009-06-29 22:20:16 UTC
Created attachment 4369 [details]
debug 10 log
Comment 2 Guenter Kukkukk 2009-06-29 22:25:46 UTC
Created attachment 4370 [details]
wireshark sniff
Comment 3 Jeremy Allison 2009-06-30 18:50:24 UTC
I think I see the problem here. I think this is a blocker for 3.4.0.
Jeremy.
Comment 4 Jeremy Allison 2009-06-30 21:10:04 UTC
Created attachment 4378 [details]
Patch for master and 3.4.0

Kukks, please test this patch asap.
Thanks,
Jeremy.
Comment 5 Jeremy Allison 2009-06-30 21:15:38 UTC
Created attachment 4379 [details]
Patch for 3.3 and 3.2.

Modified patch for 3.3 and 3.2.
Jeremy.
Comment 6 Guenter Kukkukk 2009-07-01 11:08:44 UTC
Jeremy,

applied your patch to Version 3.4.0-GIT-95c90fa-test.
Unfortunately no change in error behaviour...
I'll upload a new debug10.

Cheers, Günter 
Comment 7 Jeremy Allison 2009-07-01 11:09:45 UTC
Thanks - should have worked :-). I'll get on this immediately today.
Jeremy.
Comment 8 Guenter Kukkukk 2009-07-01 11:10:40 UTC
Created attachment 4384 [details]
new debug10 log after jra's patch applied
Comment 9 Jeremy Allison 2009-07-01 15:25:42 UTC
I need to see the result of the "stat" command from the local file being copied to the samba share so I know what the timestamps should be set to before I can make sense of this log.
Thanks,
Jeremy.
Comment 10 Guenter Kukkukk 2009-07-01 16:25:08 UTC
stat of original file on the client side:

  File: `tst.tst'
  Size: 1024            Blocks: 8          IO Block: 4096   regular file
Device: 306h/774d       Inode: 1223812     Links: 1
Access: (0666/-rw-rw-rw-)  Uid: ( 1000/      gk)   Gid: (  100/   users)
Access: 2009-07-01 05:04:38.000000000 +0200
Modify: 1988-10-10 18:53:33.000000000 +0100
Change: 2008-06-01 03:39:08.000000000 +0200

Cheers, Günter


Comment 11 Jeremy Allison 2009-07-01 16:32:19 UTC
Created attachment 4388 [details]
Replacement patch for 3.4.0 and master

Ok, this patch allows pending modtimes on all handles to be removed when an explicit time modification is done on a file name, as well as a handle.
Kukks, please check this with the latest CIFSFS.
Thanks,
Jeremy.
Comment 12 Guenter Kukkukk 2009-07-01 17:10:59 UTC
Created attachment 4389 [details]
debug10 log after jra's 2nd patch
Comment 13 Jeremy Allison 2009-07-01 18:27:24 UTC
Created attachment 4391 [details]
Replacement patch for 3.3 and 3.2.

This fix should work for 3.3/3.2.
Jeremy.
Comment 14 Guenter Kukkukk 2009-07-01 22:10:33 UTC
it was my fault taking Jeremy's "fixing" time longer as needed.
I deeply apologize for that.

Both fixes from Jeremy:
  samba 3.4.x
  samba 3.3.x

now work here!

BTW - i've only tested 3.4.x and 3.3.x (_not_ 3.2.x!)

Congrats to Jeremy! :-)

Cheers, Günter
Comment 15 Karolin Seeger 2009-07-02 01:42:32 UTC
Pushed patches to v3-4-test, v3-3-test and v3-2-test.

Thanks!