1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/pkg/mount
Kir Kolyshkin a1d095199d mount.Unmount(): don't look into /proc/self/mountinfo
Now, every Unmount() call takes a burden to parse the whole nine yards
of /proc/self/mountinfo to figure out whether the given mount point is
mounted or not (and returns an error in case parsing fails somehow).

Instead, let's just call umount() and ignore EINVAL, which results
in the same behavior, but much better performance.

Note that EINVAL is returned from umount(2) not only in the case when
`target` is not mounted, but also for invalid flags. As the flags are
hardcoded here, it can't be the case.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-04-19 14:49:50 -07:00
..
flags.go Add canonical import comment 2018-02-05 16:51:57 -05:00
flags_freebsd.go Add canonical import comment 2018-02-05 16:51:57 -05:00
flags_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
flags_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mount.go mount.Unmount(): don't look into /proc/self/mountinfo 2018-04-19 14:49:50 -07:00
mount_unix_test.go pkg/mount: implement/use filter for mountinfo parsing 2018-04-19 14:48:09 -07:00
mounter_freebsd.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mounter_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mounter_linux_test.go pkg/mount: implement/use filter for mountinfo parsing 2018-04-19 14:48:09 -07:00
mounter_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mountinfo.go pkg/mount: use sort.Slice 2018-03-06 12:46:58 -08:00
mountinfo_freebsd.go pkg/mount: implement/use filter for mountinfo parsing 2018-04-19 14:48:09 -07:00
mountinfo_linux.go pkg/mount/mountinfo_linux: parser speed up 2018-04-19 14:49:42 -07:00
mountinfo_linux_test.go pkg/mount/mountinfo_linux: parser speed up 2018-04-19 14:49:42 -07:00
mountinfo_unsupported.go pkg/mount: implement/use filter for mountinfo parsing 2018-04-19 14:48:09 -07:00
mountinfo_windows.go pkg/mount: implement/use filter for mountinfo parsing 2018-04-19 14:48:09 -07:00
sharedsubtree_linux.go Add canonical import comment 2018-02-05 16:51:57 -05:00
sharedsubtree_linux_test.go pkg/mount unit tests: skip some test under non-root 2018-03-06 12:37:27 -08:00