Skip to content
  • Maxim Patlasov's avatar
    fuse: clear FUSE_I_CTIME_DIRTY flag on setattr · 3ad22c62
    Maxim Patlasov authored
    
    
    The patch addresses two use-cases when the flag may be safely cleared:
    
    1. fuse_do_setattr() is called with ATTR_CTIME flag set in attr->ia_valid.
    In this case attr->ia_ctime bears actual value. In-kernel fuse must send it
    to the userspace server and then assign the value to inode->i_ctime.
    
    2. fuse_do_setattr() is called with ATTR_SIZE flag set in attr->ia_valid,
    whereas ATTR_CTIME is not set (truncate(2)).
    In this case in-kernel fuse must sent "now" to the userspace server and then
    assign the value to inode->i_ctime.
    
    In both cases we could clear I_DIRTY_SYNC, but that needs more thought.
    
    Signed-off-by: default avatarMaxim Patlasov <MPatlasov@parallels.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    3ad22c62