From e0614367ca27c2e47649e08291e0f1d19d42232e Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 31 Mar 2020 01:59:44 -0700 Subject: pkg/spec.InitFSMounts: optimize Instead of getting mount options from /proc/self/mountinfo, which is very costly to read/parse (and can even be unreliable), let's use statfs(2) to figure out the flags we need. [v2: move getting default options to pkg/util, make it linux-specific] Signed-off-by: Kir Kolyshkin --- pkg/util/mountOpts_other.go | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pkg/util/mountOpts_other.go (limited to 'pkg/util/mountOpts_other.go') diff --git a/pkg/util/mountOpts_other.go b/pkg/util/mountOpts_other.go new file mode 100644 index 000000000..6a34942e5 --- /dev/null +++ b/pkg/util/mountOpts_other.go @@ -0,0 +1,7 @@ +// +build !linux + +package util + +func getDefaultMountOptions(path string) (opts defaultMountOptions, err error) { + return +} -- cgit v1.2.3-54-g00ecf