Re: [RFC] [PATCH] do_sys_truncate: call do_truncate with ATTR_MTIME|ATTR_CTIME

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

 



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 [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