Messages in this thread | | | Subject | Re: [RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME | From | Trond Myklebust <> | Date | Fri, 30 Jun 2006 09:59:15 -0400 |
| |
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/
| |