public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ctime set by truncate even if NOCMTIME requested
@ 2005-09-19 17:51 Steve French
  2005-09-19 18:58 ` Trond Myklebust
  0 siblings, 1 reply; 13+ messages in thread
From: Steve French @ 2005-09-19 17:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fsdevel

I am seeing requests to set ctime on truncate which does not make any 
sense to me as I was testing with the flag that should have turned that 
off.  ie my inodes having S_NOCMTIME set, as NFS does.

do_truncate (line 206 of open.c) sets
      newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME
instead of
       newattrs.ia_valid = ATTR_SIZE;
      if(!IS_NOCMTIME(inode))
           newattrs.ia_valid |= ATTR_CTIME;

I thought that the correct way to handle this for network filesystems, 
is to let the server set the mtime and ctime unless the application 
explicitly sets the attributes (in the case of the sys call truncate or 
ftruncate the application is not explicitly setting the ctime/mtime as 
it would on a backup/restore so they should be ignored for the network 
fs so the server will set it correctl to its time, reducing traffic and 
more accurately representing the time it got updated).

Shouldn't there be a IS_NOCMTIME check in the truncate path in fs/open.c?

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-09-20 12:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox