Skip to content

syscall, x/sys/unix: wrong order of arguments for SyncFileRange on linux/ppc64{,le} #27485

@tklauser

Description

@tklauser

While investigating what was wrong with https://golang.org/cl/133015 (see #27475), I noticed that the order of the syscall arguments in the SyncFileRange implementation is wrong for ppc64 and ppc64le. They use the SYS_SYNC_FILE_RANGE2 syscall which is defined as:

https://github.com/torvalds/linux/blob/60c1f89241d49bacf71035470684a8d7b4bb46ea/fs/sync.c#L371-L375

while SYS_SYNC_FILE_RANGE used by all other GOARCHes is defined as:

https://github.com/torvalds/linux/blob/60c1f89241d49bacf71035470684a8d7b4bb46ea/fs/sync.c#L363-L367

Note the different position of the flags argument. This should be fixed by using appropriate wrappers on linux/ppc64{,le}.

/cc @bradfitz @ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.OS-Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions