On 07/04/2012 06:39 PM, Miklos Szeredi wrote: > Pavel Emelyanov <xemul@xxxxxxxxxxxxx> writes: > >> Make fuse think that when writeback is on the inode's i_size is alway >> up-to-date and not update it with the value received from the >> userspace. This is done because the page cache code may update i_size >> without letting the FS know. > > Similar rule applies to i_mtime. Except it's even more tricky, since > you have to flush the mtime together with the data (the flush should not > update the modification time). And we have other operations which also > change the mtime, and those also need to be updated. > > We should probably look at what NFS is doing. Miklos, I've looked at how NFS and FUSE manage the i_mtime. The NFS (if not looking at the fscache) tries to keep the i_mtime at the maximum between the local and the remote values. This looks like correct behavior for FUSE too. But, looking at the FUSE code I see that the existing attr_version checks do implement the same approach even if we turn the writeback cache (this series) ON. That said, I see no problems with the i_mtime management after this series. Is there something I've missed? Thanks, Pavel -- 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