We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
I use this version below, but I want to talk about code in master (that came from x/sys/unix).
$ go version go version go1.15.2 linux/amd64
Yes, a ioctl implementation doesn't match the linux manual.
go env
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/viric/.cache/go-build" GOENV="/home/viric/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/viric/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/viric/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/nix/store/dz12rdqlp94rqinvcmk6knia6cw5s8ra-go-1.15.2/share/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/nix/store/dz12rdqlp94rqinvcmk6knia6cw5s8ra-go-1.15.2/share/go/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build423744141=/tmp/go-build -gno-record-gcc-switches"
I want to use the (x/)sys/unix IoctlFileDedupeRange function
It should ressemble the ioctl described in the linux manual:
int ioctl(int src_fd, FIDEDUPERANGE, struct file_dedupe_range *arg); struct file_dedupe_range { __u64 src_offset; __u64 src_length; __u16 dest_count; __u16 reserved1; __u32 reserved2; struct file_dedupe_range_info info[0]; }; struct file_dedupe_range_info { __s64 dest_fd; __u64 dest_offset; __u64 bytes_deduped; __s32 status; __u32 reserved; };
This is the ioctl in sys/unix (golang master or x/sys/unix) is like this: https://pkg.go.dev/golang.org/x/sys/unix#IoctlFileDedupeRange
destFd should be srcFd, and the 'info' member is not there, making the call unusable.
func IoctlFileDedupeRange(destFd int, value *FileDedupeRange) error type FileDedupeRange struct { Src_offset uint64 Src_length uint64 Dest_count uint16 Reserved1 uint16 Reserved2 uint32 }
The text was updated successfully, but these errors were encountered:
closing double/duplicate issue #43678
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?I use this version below, but I want to talk about code in master (that came from x/sys/unix).
Does this issue reproduce with the latest release?
Yes, a ioctl implementation doesn't match the linux manual.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I want to use the (x/)sys/unix IoctlFileDedupeRange function
What did you expect to see?
It should ressemble the ioctl described in the linux manual:
What did you see instead?
This is the ioctl in sys/unix (golang master or x/sys/unix) is like this: https://pkg.go.dev/golang.org/x/sys/unix#IoctlFileDedupeRange
destFd should be srcFd, and the 'info' member is not there, making the call unusable.
The text was updated successfully, but these errors were encountered: