From 07a8df180c346780ceb188932d6657af725ae026 Mon Sep 17 00:00:00 2001 From: Paul Lindner Date: Tue, 21 Nov 2017 13:20:13 -0800 Subject: [PATCH] vendor: update bazil.org/fuse Full Revision Information - path: bazil.org/fuse rev: 371fbbdaa8987b715bdd21d6adc4c9b20155f748 Change-Id: I6787dec20690ca0392222a7f0fa17f9b45c956c7 --- vendor/bazil.org/fuse/.gitignore | 11 ------- vendor/bazil.org/fuse/options.go | 38 ++++++++++++++++++++++++ vendor/bazil.org/fuse/options_darwin.go | 5 ++++ vendor/bazil.org/fuse/options_freebsd.go | 4 +++ vendor/bazil.org/fuse/options_linux.go | 4 +++ 5 files changed, 51 insertions(+), 11 deletions(-) delete mode 100644 vendor/bazil.org/fuse/.gitignore diff --git a/vendor/bazil.org/fuse/.gitignore b/vendor/bazil.org/fuse/.gitignore deleted file mode 100644 index 53589948c..000000000 --- a/vendor/bazil.org/fuse/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*~ -.#* -## the next line needs to start with a backslash to avoid looking like -## a comment -\#*# -.*.swp - -*.test - -/clockfs -/hellofs diff --git a/vendor/bazil.org/fuse/options.go b/vendor/bazil.org/fuse/options.go index caee49538..65ce8a541 100644 --- a/vendor/bazil.org/fuse/options.go +++ b/vendor/bazil.org/fuse/options.go @@ -106,6 +106,32 @@ func NoAppleXattr() MountOption { return noAppleXattr } +// ExclCreate causes O_EXCL flag to be set for only "truly" exclusive creates, +// i.e. create calls for which the initiator explicitly set the O_EXCL flag. +// +// OSXFUSE expects all create calls to return EEXIST in case the file +// already exists, regardless of whether O_EXCL was specified or not. +// To ensure this behavior, it normally sets OpenExclusive for all +// Create calls, regardless of whether the original call had it set. +// For distributed filesystems, that may force every file create to be +// a distributed consensus action, causing undesirable delays. +// +// This option makes the FUSE filesystem see the original flag value, +// and better decide when to ensure global consensus. +// +// Note that returning EEXIST on existing file create is still +// expected with OSXFUSE, regardless of the presence of the +// OpenExclusive flag. +// +// For more information, see +// https://github.com/osxfuse/osxfuse/issues/209 +// +// OS X only. Others ignore this options. +// Requires OSXFUSE 3.4.1 or newer. +func ExclCreate() MountOption { + return exclCreate +} + // DaemonTimeout sets the time in seconds between a request and a reply before // the FUSE mount is declared dead. // @@ -270,3 +296,15 @@ func OSXFUSELocations(paths ...OSXFUSEPaths) MountOption { return nil } } + +// AllowNonEmptyMount allows the mounting over a non-empty directory. +// +// The files in it will be shadowed by the freshly created mount. By +// default these mounts are rejected to prevent accidental covering up +// of data, which could for example prevent automatic backup. +func AllowNonEmptyMount() MountOption { + return func(conf *mountConfig) error { + conf.options["nonempty"] = "" + return nil + } +} diff --git a/vendor/bazil.org/fuse/options_darwin.go b/vendor/bazil.org/fuse/options_darwin.go index b53402466..faa9d78e7 100644 --- a/vendor/bazil.org/fuse/options_darwin.go +++ b/vendor/bazil.org/fuse/options_darwin.go @@ -28,3 +28,8 @@ func noAppleDouble(conf *mountConfig) error { conf.options["noappledouble"] = "" return nil } + +func exclCreate(conf *mountConfig) error { + conf.options["excl_create"] = "" + return nil +} diff --git a/vendor/bazil.org/fuse/options_freebsd.go b/vendor/bazil.org/fuse/options_freebsd.go index 2387124c2..7c164b136 100644 --- a/vendor/bazil.org/fuse/options_freebsd.go +++ b/vendor/bazil.org/fuse/options_freebsd.go @@ -22,3 +22,7 @@ func noAppleXattr(conf *mountConfig) error { func noAppleDouble(conf *mountConfig) error { return nil } + +func exclCreate(conf *mountConfig) error { + return nil +} diff --git a/vendor/bazil.org/fuse/options_linux.go b/vendor/bazil.org/fuse/options_linux.go index 77b46a500..13f0896d5 100644 --- a/vendor/bazil.org/fuse/options_linux.go +++ b/vendor/bazil.org/fuse/options_linux.go @@ -19,3 +19,7 @@ func noAppleXattr(conf *mountConfig) error { func noAppleDouble(conf *mountConfig) error { return nil } + +func exclCreate(conf *mountConfig) error { + return nil +}