[Bug 305191] cp -p does not copy mtime to CIFS share

bugzilla at redhat.com bugzilla at redhat.com
Fri Apr 18 19:59:53 UTC 2008


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: cp -p does not copy mtime to CIFS share


https://bugzilla.redhat.com/show_bug.cgi?id=305191





------- Additional Comments From jlayton at redhat.com  2008-04-18 15:59 EST -------
I've been able to reproduce this against windows:

  6   0.008533 10.11.231.229 -> 10.11.231.44 SMB NT Create AndX Request, Path:
\p1\p2\p3\svc-recv-error.patch
  7   0.009599 10.11.231.44 -> 10.11.231.229 SMB NT Create AndX Response, FID:
0xc00f

...file is created...

  8   0.011168 10.11.231.229 -> 10.11.231.44 SMB Write AndX Request, FID:
0xc00f, 827 bytes at offset 0
  9   0.012117 10.11.231.44 -> 10.11.231.229 SMB Write AndX Response, FID:
0xc00f, 827 bytes

...write some data to it...

 10   0.013129 10.11.231.229 -> 10.11.231.44 SMB Trans2 Request, SET_PATH_INFO,
Path: \p1\p2\p3\svc-recv-error.patch
 11   0.014082 10.11.231.44 -> 10.11.231.229 SMB Trans2 Response, SET_PATH_INFO

...here we set the "last write" and "last access" times to the timestamp of the
source file. Server returns success....


 12   0.015010 10.11.231.229 -> 10.11.231.44 SMB Close Request, FID: 0xc00f
 13   0.015803 10.11.231.44 -> 10.11.231.229 SMB Close Response, FID: 0xc00f

...we close the file...

 15   5.823131 10.11.231.229 -> 10.11.231.44 SMB Trans2 Request,
QUERY_PATH_INFO, Query File All Info, Path: \p1\p2\p3\svc-recv-error.patch
 16   5.824217 10.11.231.44 -> 10.11.231.229 SMB Trans2 Response, QUERY_PATH_INFO

...now QUERY_PATH_INFO (I did a stat against the file on the client). This info
has the "last write" time set to the current time -- *not* what was set in the
SET_PATH_INFO call above. Apparently the CLOSE call is affecting the "last
write" time somehow.

I suspect that the server is buffering the write until the close call comes in
and then that is clobbering the time we're setting. We may be able to mitigate
this by forcing it to flush the data before the SET_PATH_INFO call, but I'll
need to research it a bit...


-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the fedora-triage-list mailing list