Re: [patch v2] fix truncate inode time modification breakage

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

 



On 06/03/2010 11:18 AM, Miklos Szeredi wrote:
> On Thu, 3 Jun 2010, Nick Piggin wrote:
>> Index: linux-2.6/fs/fuse/dir.c
>> ===================================================================
>> --- linux-2.6.orig/fs/fuse/dir.c
>> +++ linux-2.6/fs/fuse/dir.c
>> @@ -1161,20 +1161,6 @@ static int fuse_dir_fsync(struct file *f
>>  	return fuse_fsync_common(file, datasync, 1);
>>  }
>>  
>> -static bool update_mtime(unsigned ivalid)
>> -{
>> -	/* Always update if mtime is explicitly set  */
>> -	if (ivalid & ATTR_MTIME_SET)
>> -		return true;
>> -
>> -	/* If it's an open(O_TRUNC) or an ftruncate(), don't update */
>> -	if ((ivalid & ATTR_SIZE) && (ivalid & (ATTR_OPEN | ATTR_FILE)))
>> -		return false;
>> -
>> -	/* In all other cases update */
>> -	return true;
>> -}
>> -
> 
> Fuse philosophy is: each operation itself has to update times on files
> if necessary.  So it basically moves the responsibility to update
> [amc]time from the VFS into the filesystem.
> 
> This means the only place fuse is interested in ATTR_ATIME or
> ATTR_MTIME is for the utime* syscalls.
> 
> It also means that fuse always ignores ATTR_CTIME which is never set
> explicitly.
> 
> So I believe the current fuse code is correct.
> 

It might be correct, but there were reports it has problems with NFS export.
Why let the filesystems be broken? Why not do the common stuff common? (In VFS)

Boaz

> 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

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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux