MCPcopy
hub / github.com/containerd/containerd / removeLoop

Function removeLoop

core/mount/losetup_linux.go:218–226  ·  view source on GitHub ↗
(loopdev string)

Source from the content-addressed store, hash-verified

216}
217
218func removeLoop(loopdev string) error {
219 file, err := os.Open(loopdev)
220 if err != nil {
221 return err
222 }
223 defer file.Close()
224
225 return unix.IoctlSetInt(int(file.Fd()), unix.LOOP_CLR_FD, 0)
226}
227
228// AttachLoopDevice attaches a specified backing file to a loop device
229func AttachLoopDevice(backingFile string) (string, error) {

Callers 2

TestAutoclearFalseLoopFunction · 0.85
DetachLoopDeviceFunction · 0.85

Calls 2

CloseMethod · 0.65
OpenMethod · 0.45

Tested by 1

TestAutoclearFalseLoopFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…