ctime set by truncate even if NOCMTIME requested

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

 



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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux