containerd/mount
Ilya Hanov 1555a31bf6 mount: support idmapped mount points
This patch introduces idmapped mounts support for
container rootfs.

The idmapped mounts support was merged in Linux kernel 5.12
torvalds/linux@7d6beb7.
This functionality allows to address chown overhead for containers that
use user namespace.

The changes are based on experimental patchset published by
Mauricio Vásquez #4734.
Current version reiplements support of idmapped mounts using Golang.

Performance measurement results:
Image           idmapped mount  recursive chown
BusyBox         00.135          04.964
Ubuntu          00.171          15.713
Fedora          00.143          38.799

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
Signed-off-by: Artem Kuzin <artem.kuzin@huawei.com>
Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
Signed-off-by: Ilya Hanov <ilya.hanov@huawei-partners.com>
2023-09-05 01:23:30 +03:00
..
lookup_linux_test.go Use testify 2022-04-01 18:17:58 -07:00
lookup_unix.go bugfix: resolve symlink when looking up mountpoint 2023-05-22 11:03:51 +08:00
lookup_unsupported.go Cleanup build constraints 2022-12-08 09:36:20 -08:00
losetup_linux_test.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
losetup_linux.go mount: support direct-io for loopback device 2023-06-15 23:51:46 +08:00
mount_freebsd.go Revert "Add support for mounts on Darwin" 2023-07-19 00:22:20 +09:00
mount_idmapped_linux.go mount: support idmapped mount points 2023-09-05 01:23:30 +03:00
mount_linux_test.go add handling of a '.' commondir and bounds checking to mount_linux 2023-05-30 21:13:16 +00:00
mount_linux.go mount: support idmapped mount points 2023-09-05 01:23:30 +03:00
mount_test.go Add WithReadonlyTempMount to create readonly temporary mounts 2023-03-17 15:51:18 +00:00
mount_unix.go Revert "Add support for mounts on Darwin" 2023-07-19 00:22:20 +09:00
mount_unsupported.go Revert "Add support for mounts on Darwin" 2023-07-19 00:22:20 +09:00
mount_windows.go Revert "Add support for mounts on Darwin" 2023-07-19 00:22:20 +09:00
mount.go mount: Add From/ToProto helpers 2023-06-28 04:03:18 -07:00
mountinfo.go mount: mount.PID(), mount.Self(): change signature to return pointers 2021-01-08 17:31:53 +01:00
temp_unix.go Cleanup build constraints 2022-12-08 09:36:20 -08:00
temp_unsupported.go Cleanup build constraints 2022-12-08 09:36:20 -08:00
temp.go Add WithReadonlyTempMount to create readonly temporary mounts 2023-03-17 15:51:18 +00:00