summaryrefslogtreecommitdiff
path: root/cli_args.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-11-24 22:36:04 +0100
committerJakob Unterwurzacher2016-11-25 09:19:14 +0100
commit0f8d3318a321bf19f92e0872d741266cd0431463 (patch)
tree996edf075751eaa011db27472fd9dd3de2367cd7 /cli_args.go
parent024511d9c71558be4b1169d6bb43bd18d65539e0 (diff)
main, fusefrontend: add "-noprealloc" option
Preallocation is very slow on hdds that run btrfs. Give the user the option to disable it. This greatly speeds up small file operations but reduces the robustness against out-of-space errors. Also add the option to the man page. More info: https://github.com/rfjakob/gocryptfs/issues/63
Diffstat (limited to 'cli_args.go')
-rw-r--r--cli_args.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli_args.go b/cli_args.go
index 5751f81..7301d9a 100644
--- a/cli_args.go
+++ b/cli_args.go
@@ -16,7 +16,8 @@ import (
type argContainer struct {
debug, init, zerokey, fusedebug, openssl, passwd, fg, version,
plaintextnames, quiet, nosyslog, wpanic,
- longnames, allow_other, ro, reverse, aessiv, nonempty, raw64 bool
+ longnames, allow_other, ro, reverse, aessiv, nonempty, raw64,
+ noprealloc bool
masterkey, mountpoint, cipherdir, cpuprofile, extpass,
memprofile, ko, passfile, ctlsock string
// Configuration file name override
@@ -105,6 +106,7 @@ func parseCliOpts() (args argContainer) {
flagSet.BoolVar(&args.aessiv, "aessiv", false, "AES-SIV encryption")
flagSet.BoolVar(&args.nonempty, "nonempty", false, "Allow mounting over non-empty directories")
flagSet.BoolVar(&args.raw64, "raw64", false, "Use unpadded base64 for file names")
+ flagSet.BoolVar(&args.noprealloc, "noprealloc", false, "Disable preallocation before writing")
flagSet.StringVar(&args.masterkey, "masterkey", "", "Mount with explicit master key")
flagSet.StringVar(&args.cpuprofile, "cpuprofile", "", "Write cpu profile to specified file")
flagSet.StringVar(&args.memprofile, "memprofile", "", "Write memory profile to specified file")
@@ -116,7 +118,7 @@ func parseCliOpts() (args argContainer) {
flagSet.IntVar(&args.notifypid, "notifypid", 0, "Send USR1 to the specified process after "+
"successful mount - used internally for daemonization")
flagSet.IntVar(&args.scryptn, "scryptn", configfile.ScryptDefaultLogN, "scrypt cost parameter logN. "+
- "Setting this to a lower value speeds up mounting but makes the password susceptible to brute-force attacks")
+ "A lower value speeds up mounting but makes the password susceptible to brute-force attacks")
// Ignored otions
var dummyBool bool
ignoreText := "(ignored for compatibility)"