On Thu, 3 Jun 2010, Nick Piggin wrote: > > (In fact I think it would be cleanest if truncate/ftruncate was a > > separate operation from setattr on all levels, but that's a different > > story.) > > Well it's possible. It is a combination of inode and address space > operation really. Because you really want to update mtime/ctime and > suid bits iff the truncate succeeds. Well, same as write() really. Except truncate is an inode op, while ftruncate is a file op just like write. > We did consider a new API for it, but it didn't seem to be an > obvious improvement. A filesystem can easily branch into another > function for ATTR_SIZE immediately on setattr entry. > > > > So for now something like > > > > if (valid & ATTR_SIZE) > > valid &= ~(ATTR_MTIME | ATTR_CTIME); > > > > would work? > > That should do the trick, yes. But I think CTIME would just confuse > things seeing as you ignore it everywhere else. Yes. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html