The Samba-Bugzilla – Attachment 2809 Details for
Bug 4779
modification time inconsistency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.0.25b
look (text/plain), 1.35 KB, created by
Jeremy Allison
on 2007-07-11 20:50:12 UTC
(
hide
)
Description:
Patch for 3.0.25b
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2007-07-11 20:50:12 UTC
Size:
1.35 KB
patch
obsolete
>Index: smbd/trans2.c >=================================================================== >--- smbd/trans2.c (revision 23844) >+++ smbd/trans2.c (working copy) >@@ -4845,18 +4845,21 @@ > allocation_size = smb_roundup(conn, allocation_size); > } > >- if(allocation_size == get_file_size(*psbuf)) { >- return NT_STATUS_OK; >- } >- > DEBUG(10,("smb_set_file_allocation_info: file %s : setting new allocation size to %.0f\n", > fname, (double)allocation_size )); >- >+ > if (fsp && fsp->fh->fd != -1) { > /* Open file handle. */ > if (vfs_allocate_file_space(fsp, allocation_size) == -1) { > return map_nt_error_from_unix(errno); > } >+ /* Changing the allocation size should set the last mod time. */ >+ fsp_set_pending_modtime(fsp, timespec_current()); >+ >+ /* >+ * This is equivalent to a write. Ensure it's seen immediately. >+ */ >+ set_filetime(fsp->conn, fsp->fsp_name, fsp->pending_modtime); > return NT_STATUS_OK; > } > >@@ -4875,6 +4878,11 @@ > /* NB. We check for open_was_deferred in the caller. */ > return status; > } >+ >+ /* Changing the allocation size should set the last mod time. */ >+ fsp_set_pending_modtime(new_fsp, timespec_current()); >+ /* Don't need to call set_filetime as this will be flushed on >+ * close. */ > if (vfs_allocate_file_space(new_fsp, allocation_size) == -1) { > status = map_nt_error_from_unix(errno); > close_file(new_fsp,NORMAL_CLOSE);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4779
:
2809
|
2810