From: Steve French <smfrench@austin.rr.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
samba-technical@lists.samba.org
Subject: Re: ctime set by truncate even if NOCMTIME requested
Date: Mon, 19 Sep 2005 21:16:15 -0500 [thread overview]
Message-ID: <432F70EF.9010100@austin.rr.com> (raw)
In-Reply-To: <1127180199.26459.17.camel@lade.trondhjem.org>
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
>ATTR_MTIME?
>
>
>
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)
next prev parent reply other threads:[~2005-09-20 2:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-19 17:51 ctime set by truncate even if NOCMTIME requested Steve French
2005-09-19 18:58 ` Trond Myklebust
2005-09-19 20:58 ` Steve French
2005-09-19 21:28 ` Trond Myklebust
[not found] ` <432F5968.1020106@austin.rr.com>
2005-09-20 1:36 ` Trond Myklebust
2005-09-20 2:16 ` Steve French [this message]
2005-09-20 12:11 ` Andreas Dilger
2005-09-20 8:52 ` Miklos Szeredi
2005-09-20 10:05 ` Miklos Szeredi
2005-09-20 12:12 ` Trond Myklebust
2005-09-20 12:20 ` Miklos Szeredi
2005-09-20 12:27 ` Trond Myklebust
2005-09-20 8:48 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=432F70EF.9010100@austin.rr.com \
--to=smfrench@austin.rr.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox