• Han-Wen Nienhuys's avatar
    fuse: support RENAME2 in RawFileSystem · fb9b7327
    Han-Wen Nienhuys authored
    In practice, this only triggers for RENAME_EXCHANGE, as the kernel
    issues the RENAME opcode in case of a normal rename or a
    RENAME_NOREPLACE.
    
    We have always advertised rename2 support (protocol v23), but it returned
    ENOSYS always. Instead, rename RenameIn => Rename1In, and add Flags to
    RenameIn.
    
    For raw filesystems that want to support rename2 should examine
    RenameIn.Flags and check for syscall.RENAME_XXX.
    
    For fuse/nodefs, we return ENOSYS in case of Rename2, since we lack
    API surface to propagate the flags.
    fb9b7327
types.go 10.6 KB