Skip to content

Commit b9f2e48

Browse files
committed
feat: make overlay sync removal configurable
Signed-off-by: Cardy.Tang <[email protected]>
1 parent 8781329 commit b9f2e48

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

snapshots/overlay/plugin/plugin.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type Config struct {
3131
// Root directory for the plugin
3232
RootPath string `toml:"root_path"`
3333
UpperdirLabel bool `toml:"upperdir_label"`
34+
SyncRemove bool `toml:"sync_remove"`
3435
}
3536

3637
func init() {
@@ -55,9 +56,12 @@ func init() {
5556
if config.UpperdirLabel {
5657
oOpts = append(oOpts, overlay.WithUpperdirLabel)
5758
}
59+
if !config.SyncRemove {
60+
oOpts = append(oOpts, overlay.AsynchronousRemove)
61+
}
5862

5963
ic.Meta.Exports["root"] = root
60-
return overlay.NewSnapshotter(root, append(oOpts, overlay.AsynchronousRemove)...)
64+
return overlay.NewSnapshotter(root, oOpts...)
6165
},
6266
})
6367
}

0 commit comments

Comments
 (0)