Skip to content

Commit 453fa39

Browse files
cardyokfuweid
authored andcommitted
feat: make overlay sync removal configurable
Signed-off-by: Cardy.Tang <[email protected]> (cherry picked from commit b9f2e48) Signed-off-by: Wei Fu <[email protected]>
1 parent 8559256 commit 453fa39

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
@@ -32,6 +32,7 @@ type Config struct {
3232
// Root directory for the plugin
3333
RootPath string `toml:"root_path"`
3434
UpperdirLabel bool `toml:"upperdir_label"`
35+
SyncRemove bool `toml:"sync_remove"`
3536
}
3637

3738
func init() {
@@ -56,9 +57,12 @@ func init() {
5657
if config.UpperdirLabel {
5758
oOpts = append(oOpts, overlay.WithUpperdirLabel)
5859
}
60+
if !config.SyncRemove {
61+
oOpts = append(oOpts, overlay.AsynchronousRemove)
62+
}
5963

6064
ic.Meta.Exports["root"] = root
61-
return overlay.NewSnapshotter(root, append(oOpts, overlay.AsynchronousRemove)...)
65+
return overlay.NewSnapshotter(root, oOpts...)
6266
},
6367
})
6468
}

0 commit comments

Comments
 (0)