MCPcopy
hub / github.com/containerd/containerd / unmount

Function unmount

core/mount/mount_unix.go:76–97  ·  view source on GitHub ↗
(target string, flags int)

Source from the content-addressed store, hash-verified

74}
75
76func unmount(target string, flags int) error {
77 if isFUSE(target) {
78 // TODO: Why error is ignored?
79 // Shouldn't this just be unconditional "return unmountFUSE(target)"?
80 if err := unmountFUSE(target); err == nil {
81 return nil
82 }
83 }
84 for range 50 {
85 if err := unix.Unmount(target, flags); err != nil {
86 switch err {
87 case unix.EBUSY:
88 time.Sleep(50 * time.Millisecond)
89 continue
90 default:
91 return err
92 }
93 }
94 return nil
95 }
96 return fmt.Errorf("failed to unmount target %s: %w", target, unix.EBUSY)
97}
98
99// Unmount the provided mount path with the flags
100func Unmount(target string, flags int) error {

Callers 4

mountMethod · 0.85
mountWithHelperMethod · 0.85
UnmountFunction · 0.85
UnmountAllFunction · 0.85

Calls 3

isFUSEFunction · 0.70
unmountFUSEFunction · 0.70
UnmountMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…