containerd/vendor/github.com/hanwen/go-fuse/v2/fs/loopback_linux.go
Brad Davidson 890953d3c6
Enable btrfs/fuse-overlayfs/stargz snapshotter plugins
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:41 +00:00

27 lines
581 B
Go

//go:build linux
// +build linux
// Copyright 2019 the Go-FUSE Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fs
import (
"syscall"
"golang.org/x/sys/unix"
)
const unix_UTIME_OMIT = unix.UTIME_OMIT
func doCopyFileRange(fdIn int, offIn int64, fdOut int, offOut int64,
len int, flags int) (uint32, syscall.Errno) {
count, err := unix.CopyFileRange(fdIn, &offIn, fdOut, &offOut, len, flags)
return uint32(count), ToErrno(err)
}
func intDev(dev uint32) int {
return int(dev)
}