moby/daemon/graphdriver
Mike Sul de2447c2ab
daemon: overlay2: Write layer metadata atomically
When the daemon process or the host running it is abruptly terminated,
the layer metadata file can become inconsistent on the file system.
Specifically, `link` and `lower` files may exist but be empty, leading
to overlay mounting errors during layer extraction, such as:
"failed to register layer: error creating overlay mount to <path>:
too many levels of symbolic links."

This commit introduces the use of `AtomicWriteFile` to ensure that the
layer metadata files contain correct data when they exist on the file system.

Signed-off-by: Mike <mike.sul@foundries.io>
2023-09-13 15:07:32 +02:00
..
btrfs daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
copy remove some remaining pre-go1.17 build-tags 2023-08-24 17:51:07 +02:00
fuse-overlayfs daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
graphtest daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
overlay2 daemon: overlay2: Write layer metadata atomically 2023-09-13 15:07:32 +02:00
overlayutils remove some remaining pre-go1.17 build-tags 2023-08-24 17:51:07 +02:00
register remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
vfs daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
windows remove some remaining pre-go1.17 build-tags 2023-08-24 17:51:07 +02:00
zfs daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
counter.go graphdriver: Fix RefCounter memory leak 2018-02-09 10:26:06 +08:00
driver.go daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
driver_freebsd.go daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
driver_linux.go daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
driver_test.go daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
driver_unsupported.go daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
driver_windows.go daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
errors.go Add canonical import comment 2018-02-05 16:51:57 -05:00
fsdiff.go daemon/graphdriver: format code with gofumpt 2023-06-29 00:31:34 +02:00
plugin.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
proxy.go pkg/containerfs: drop ContainerFS type alias 2022-09-23 16:56:53 -04:00
proxy_test.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00