From 7983b6bdca6aad860a15cf7d61cfdef3f680b6fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Sun, 22 Jul 2018 12:29:24 +0200 Subject: [PATCH] vfs: enable vfs-read-chunk-size by default --- vfs/vfs.go | 2 ++ vfs/vfsflags/vfsflags.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vfs/vfs.go b/vfs/vfs.go index 3813a0817..e436fb3ff 100644 --- a/vfs/vfs.go +++ b/vfs/vfs.go @@ -48,6 +48,8 @@ var DefaultOpt = Options{ CacheMode: CacheModeOff, CacheMaxAge: 3600 * time.Second, CachePollInterval: 60 * time.Second, + ChunkSize: 128 * fs.MebiByte, + ChunkSizeLimit: -1, } // Node represents either a directory (*Dir) or a file (*File) diff --git a/vfs/vfsflags/vfsflags.go b/vfs/vfsflags/vfsflags.go index 6ae07c38b..47abf8eab 100644 --- a/vfs/vfsflags/vfsflags.go +++ b/vfs/vfsflags/vfsflags.go @@ -24,6 +24,6 @@ func AddFlags(flagSet *pflag.FlagSet) { flags.DurationVarP(flagSet, &Opt.CachePollInterval, "vfs-cache-poll-interval", "", Opt.CachePollInterval, "Interval to poll the cache for stale objects.") flags.DurationVarP(flagSet, &Opt.CacheMaxAge, "vfs-cache-max-age", "", Opt.CacheMaxAge, "Max age of objects in the cache.") flags.FVarP(flagSet, &Opt.ChunkSize, "vfs-read-chunk-size", "", "Read the source objects in chunks.") - flags.FVarP(flagSet, &Opt.ChunkSizeLimit, "vfs-read-chunk-size-limit", "", "If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached. -1 is unlimited.") + flags.FVarP(flagSet, &Opt.ChunkSizeLimit, "vfs-read-chunk-size-limit", "", "If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached. 'off' is unlimited.") platformFlags(flagSet) }