unix: add IoctlFile{Clone,CloneRange,DedupeRange} on linux

Add wrappers for the FICLONE, FICLONERANGE and FIDEDUPERANGE ioctl
operations on linux. See the ioctl_ficlone(2), ioctl_ficlonerange(2) and
ioctl_fideduperange(2) man pages for details.

Change-Id: If3bad98facc362d4f7524e8d7a128815e9e2f204
Reviewed-on: https://go-review.googlesource.com/c/sys/+/256000
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser
2020-09-22 07:02:32 +00:00
committed by Tobias Klauser
parent e10f822d58
commit aee5d888a8
18 changed files with 72 additions and 0 deletions
+4
View File
@@ -465,6 +465,10 @@ type Fsid C.fsid_t
type Flock_t C.struct_flock
type FileCloneRange C.struct_file_clone_range
type FileDedupeRange C.struct_file_dedupe_range
// Filesystem Encryption
type FscryptPolicy C.struct_fscrypt_policy