Re: [PATCH against 2.6.14] truncate() or ftruncate shouldn't change mtime if size doesn't change.

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

 



On Tue, 2005-11-01 at 09:53 +1100, Neil Brown wrote:
> On Monday October 31, [email protected] wrote:
> > 
> > What we can, however, do is to ensure that truncate() and ftruncate()
> > only set ATTR_SIZE, but ensure that may_open() sets ATTR_MTIME|
> > ATTR_CTIME as well.
> 
> Thanks.  This makes lots of sense, in that it gives power to the
> filesystem.  We should keep the optimisations in placed where the
> filesystem can over-ride them, just as inode_setattr.
> 
> So, here is a revised patch.
> Comment?

Just one. Don't most of the inode->i_op->truncate() methods on local
filesystems call mark_inode_dirty()?
If so, then the call at the end of inode_setattr() will be superfluous
for the case where ia_valid==ATTR_SIZE, since vmtruncate() will dirty
the inode for us.

Otherwise, this patch looks great!

Cheers,
  Trond

-
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