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

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

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


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

  6   0.008533 -> SMB NT Create AndX Request, Path:
  7   0.009599 -> SMB NT Create AndX Response, FID:

...file is created...

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

...write some data to it...

 10   0.013129 -> SMB Trans2 Request, SET_PATH_INFO,
Path: \p1\p2\p3\svc-recv-error.patch
 11   0.014082 -> 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 -> SMB Close Request, FID: 0xc00f
 13   0.015803 -> SMB Close Response, FID: 0xc00f

...we close the file...

 15   5.823131 -> SMB Trans2 Request,
QUERY_PATH_INFO, Query File All Info, Path: \p1\p2\p3\svc-recv-error.patch
 16   5.824217 -> 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.

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