unix: fix and test the FIDEDUPERANGE Linux ioctl

The previous implementation didn't match the ioctl spec.

Fixes golang/go#43678

Change-Id: Ia1c292c2dbd4913fb1d7e8331d9f18e23169d64a
GitHub-Last-Rev: 5331c424ef5dd0384afda9effbb76afd7705ecfd
GitHub-Pull-Request: golang/sys#97
Reviewed-on: https://go-review.googlesource.com/c/sys/+/284352
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Lluís Batlle i Rossell
2021-02-25 08:00:10 +00:00
committed by Tobias Klauser
parent 683adc9d29
commit 8e9945a547
4 changed files with 171 additions and 7 deletions
+10 -1
View File
@@ -474,7 +474,16 @@ type Flock_t C.struct_flock
type FileCloneRange C.struct_file_clone_range
type FileDedupeRange C.struct_file_dedupe_range
type RawFileDedupeRange C.struct_file_dedupe_range
type RawFileDedupeRangeInfo C.struct_file_dedupe_range_info
const (
SizeofRawFileDedupeRange = C.sizeof_struct_file_dedupe_range
SizeofRawFileDedupeRangeInfo = C.sizeof_struct_file_dedupe_range_info
FILE_DEDUPE_RANGE_SAME = C.FILE_DEDUPE_RANGE_SAME
FILE_DEDUPE_RANGE_DIFFERS = C.FILE_DEDUPE_RANGE_DIFFERS
)
// Filesystem Encryption