From b4d4366149f5e0a442ebfb2304b6f52b00ae0114 Mon Sep 17 00:00:00 2001 From: Jonas Geiler Date: Fri, 16 Aug 2024 15:56:00 +0200 Subject: [PATCH] docker volume plugin: add support for ChunkStreams VFS option and add options note --- cmd/mountlib/mount.go | 1 + cmd/serve/docker/options.go | 3 +++ vfs/vfscommon/options.go | 1 + 3 files changed, 5 insertions(+) diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index 0e5419398..2331feff4 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -169,6 +169,7 @@ func init() { // Options for creating the mount type Options struct { + // when modifying these options, please make sure to update getMountOption in cmd/serve/docker/options.go DebugFUSE bool `config:"debug_fuse"` AllowNonEmpty bool `config:"allow_non_empty"` AllowRoot bool `config:"allow_root"` diff --git a/cmd/serve/docker/options.go b/cmd/serve/docker/options.go index 3998dabba..4f0d0ddd9 100644 --- a/cmd/serve/docker/options.go +++ b/cmd/serve/docker/options.go @@ -268,6 +268,9 @@ func getVFSOption(vfsOpt *vfscommon.Options, opt rc.Params, key string) (ok bool vfsOpt.FastFingerprint, err = opt.GetBool(key) case "vfs-disk-space-total-size": err = getFVarP(&vfsOpt.DiskSpaceTotalSize, opt, key) + case "vfs-read-chunk-streams": + intVal, err = opt.GetInt64(key) + vfsOpt.ChunkStreams = int(intVal) // unprefixed vfs options case "no-modtime": diff --git a/vfs/vfscommon/options.go b/vfs/vfscommon/options.go index 591ce5044..0bdb68b9d 100644 --- a/vfs/vfscommon/options.go +++ b/vfs/vfscommon/options.go @@ -162,6 +162,7 @@ func init() { // Options is options for creating the vfs type Options struct { + // when modifying these options, please make sure to update getVFSOption in cmd/serve/docker/options.go NoSeek bool `config:"no_seek"` // don't allow seeking if set NoChecksum bool `config:"no_checksum"` // don't check checksums if set ReadOnly bool `config:"read_only"` // if set VFS is read only