deprecate pkg/loopback (utility package for devicemapper)
This package was introduced inaf59752712
as a utility package for devicemapper, which was removed in commitdc11d2a2d8
(v25.0.0). It looks like there's no external consumers of this package, so we should consider removing it, but deprecating it first, just in case. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a1833d8b4d
commit
bf692d47fb
2 changed files with 10 additions and 0 deletions
|
@ -88,6 +88,8 @@ func openNextAvailableLoopback(index int, sparseFile *os.File) (loopFile *os.Fil
|
|||
|
||||
// AttachLoopDevice attaches the given sparse file to the next
|
||||
// available loopback device. It returns an opened *os.File.
|
||||
//
|
||||
// Deprecated: the loopback package is deprected and will be removed in the next release.
|
||||
func AttachLoopDevice(sparseName string) (loop *os.File, err error) {
|
||||
// Try to retrieve the next available loopback device via syscall.
|
||||
// If it fails, we discard error and start looping for a
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
//go:build linux && cgo
|
||||
|
||||
// Package loopback provides utilities to work with loopback devices.
|
||||
//
|
||||
// Deprecated: this package is deprecated and will be removed in the next release.
|
||||
|
||||
package loopback // import "github.com/docker/docker/pkg/loopback"
|
||||
|
||||
import (
|
||||
|
@ -21,6 +25,8 @@ func getLoopbackBackingFile(file *os.File) (uint64, uint64, error) {
|
|||
}
|
||||
|
||||
// SetCapacity reloads the size for the loopback device.
|
||||
//
|
||||
// Deprecated: the loopback package is deprected and will be removed in the next release.
|
||||
func SetCapacity(file *os.File) error {
|
||||
if err := unix.IoctlSetInt(int(file.Fd()), unix.LOOP_SET_CAPACITY, 0); err != nil {
|
||||
log.G(context.TODO()).Errorf("Error loopbackSetCapacity: %s", err)
|
||||
|
@ -31,6 +37,8 @@ func SetCapacity(file *os.File) error {
|
|||
|
||||
// FindLoopDeviceFor returns a loopback device file for the specified file which
|
||||
// is backing file of a loop back device.
|
||||
//
|
||||
// Deprecated: the loopback package is deprected and will be removed in the next release.
|
||||
func FindLoopDeviceFor(file *os.File) *os.File {
|
||||
var stat unix.Stat_t
|
||||
err := unix.Stat(file.Name(), &stat)
|
||||
|
|
Loading…
Add table
Reference in a new issue