[lkml]   [2005]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ctime set by truncate even if NOCMTIME requested
Trond Myklebust wrote:

>However if you know the cases where time is set implicitly by the
>server, why can't you simply optimise away the ATTR_CTIME and/or
I don't see any case other than explicit application calls on the client
to utime in which we would ever want the client to send its timestamp to
the server.

The cases that have to be checked for for the cifs client case are few -
setting the file size (truncate/ftruncate) and chmod/chown (which sets
CTIME on the client, not just the setting the mode) and in my traces
they do look different in setattr than calls to setattr that come
through utimes. For example, it probably is safe to assume that ctime
never has to be sent to the server when also one or more of the the
mode, owner or size is being set - and no other user space application
(just via the truncate system call) would ever call notify_change
(setattr) for both size and time, but it does make me nervous to throw
away any request to update the timestamps remotely if the size is also
changing (the change of the file size does need to go to the server).
It does seem like
utime(filename, timeval)
may be the only time we want to send time changes to the server but I am
not certain how risky such an approach is even after scanning fs/open.c
to ignore time changes except when both ATIME/MTIME/CTIME are set at the
same time (as they are in sys_utime and do_utimes). Most people
probably don't care if the server and client clocks are not too far off,
but it does affect performance (presumably even noticeable on something
like fsx test)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-09-20 12:06    [W:1.367 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site