truncate and {m,c}time on ntfs

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

 



Hi Christoph,

A patch of yours modified fs/ntfs/inode.c::ntfs_truncate() and inserted 
this comment:

[snip]
	/* normally ->truncate shouldn't update ctime or mtime,
	 * but ntfs did before so it got a copy & paste version
	 * of file_update_time.  one day someone should fix this
	 * for real.
	 */
[snip]

Did you realise that all (local) file systems in Linux kernel set both 
{m,c}time in their ->truncate function.  E.g. from 
fs/ext3.c/inode.c::ext3_truncate():

inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;

Would you be so kind to explain what is your problem with ntfs doing it, 
too?  And if your statement is correct and no file system should touch 
{m,c}time in their ->truncate() method, could you explain to me how the 
{m,c}time would be set otherwise when open(O_TRUNC) or {f,}truncate() is 
executed on a file?

Thanks a lot in advance.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
-
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]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux