lkml.org 
[lkml]   [2006]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME
From
Date
On Fri, 2006-06-30 at 17:33 +0400, Vladimir V. Saveliev wrote:
> Hello
>
> do_sys_ftruncate calls do_truncate with time_attrs set to ATTR_MTIME|
> ATTR_CTIME. Is there a reason for do_sys_truncate to not set time_attrs
> to the same value or it is a bug?

It would be a bug.

In the case of truncate(), the filesystem has to decide if the file size
will actually change. If it does, then it has to update mtime/ctime. In
the case of ftruncate(), it would appear that the filesystem always has
to update mtime/ctime on success, so it is appropriate to call
do_truncate with ATTR_MTIME/ATTR_CTIME.

Cheers,
Trond

> email message attachment (do_truncate-time_attrs.patch)
> > -------- Forwarded Message --------
> > Subject: No Subject
> > Date: Fri, 30 Jun 2006 17:33:29 +0400
> >

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-30 16:01    [W:0.029 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site