-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Standardized FileInfo Structure. RE: z/OS performance investigation #581
Comments
Hm… we’ve had to deal with this before, with windows, plan9 and js/wasm. https://github.com/pkg/sftp/blob/master/syscall_fixed.go#L4-L6 I’m afraid that “convert the stat packet response to the standardized fs.FileInfo” won’t be as easy as it is said. Considering various other syscall values are going to break just as much in the conversion: https://github.com/pkg/sftp/blob/master/stat_posix.go#L56-L71 Unfortunately, it looks like simply adding It might just be necessary to implement a new 😩 Unfortunately, this is some of the most painstaking work in the repo, ensuring compliance for all the various operating systems shoving values through the I-Assumed-The-POSIX-Standards-Set-Specific-Values-For-This standardized-by-implementation fields. We’ll kind of need to audit all the syscall use for the large number of OS-dependent files (fortunately, we can ignore windows and plan9 specific stuff at least)… or maybe we accelerate our integration of https://github.com/pkg/sftp/blob/master/internal/encoding/ssh/filexfer/permissions.go which just blanket defines all the OpenBSD filemode values for the wire, and ignore whatever is in the syscall package. P.S.: Also, thanks so much for looking into what’s wrong here. Narrowing it down the |
Hello, Im with the Go on z/OS dev team at IBM. We got a request to look into some performance issues with this package and zos. (#578
& #579)
When reading a file located on a linux machine to a zos machine, we see the poor performance reported by our users. The issue seems to be that despite enabling concurrent reads, checking the filemode forces sequential reading.
The fs.Mode returned from the remote machine is consistent with the linux format, but the zos
syscall
constants are used to mask and compare the value inisRegular()
. These constants do not match the linux format and cause incorrect behaviour inisRegular()
(And possibly any other functions that rely on the stat constants being consistent between machines)Bypassing the
!isRegular()
check (forcing concurrent reads) shows performance consistent with the systems default sftp.Maybe converting the stat packet response to the standardized fs.FileInfo struct could allow for the use of FileMode.IsRegular()? I'd be happy to take a stab at making the change, but I'm just looking for some guidance or alternative suggestions first.
Thanks!
The text was updated successfully, but these errors were encountered: