- The
simpleexample now negotiatesFUSE_HANDLE_KILLPRIV_V2instead ofFUSE_HANDLE_KILLPRIV, and clears suid and sgid only when the kernel asks rather than on every write, chown and truncate. That fixes two cases where it diverged from a native filesystem: a write or truncate by a caller holdingCAP_FSETIDno longer strips the bits. The unconditional clearing could not be made conditional underFUSE_HANDLE_KILLPRIV, because the kernel only setsFUSE_WRITE_KILL_SUIDGIDon a buffered write once v2 has been negotiated - Support
InitFlags::FUSE_HANDLE_KILLPRIV_V2, which the previous release refused. With it negotiated the kernel stops clearing suid and sgid itself and instead tells the filesystem which requests must clear them, soFilesystem::setattr(),open()andcreate()gain akill_suid_gidargument carrying that signal (write()already had it viaWriteFlags::FUSE_WRITE_KILL_SUIDGID). A filesystem that does not request the capability never sees it set. Note thatkill_suid_gidcovers suid and sgid only: as with plainFUSE_HANDLE_KILLPRIV, clearing thesecurity.capabilityxattr on every write, chown and truncate is also the filesystem's job under either capability, and carries no per-request signal. What v2 adds is that suid and sgid are cleared only when the caller lacksCAP_FSETID, matching what the kernel would have done itself KernelConfig::add_capabilities()now refuses capabilities fuser cannot honor, rather than requesting them and leaving the filesystem silently broken:FUSE_SECURITY_CTX,FUSE_CREATE_SUPP_GROUP,FUSE_HANDLE_KILLPRIV_V2,FUSE_ALLOW_IDMAP,FUSE_HAS_INODE_DAX,FUSE_SUBMOUNTS,FUSE_MAP_ALIGNMENT,FUSE_OVER_IO_URING,FUSE_HAS_RESENDandFUSE_REQUEST_TIMEOUT. Negotiating most of them merely had no effect, butFUSE_ALLOW_IDMAPleft the filesystem answeringEACCESto everything but inode creation, andFUSE_HANDLE_KILLPRIV_V2left suid and sgid bits surviving a chown, a truncate or anO_TRUNCopen. PlainFUSE_HANDLE_KILLPRIVstill works, as do the macFUSE capabilities that share a bit with three of these- Add
Notifier::expire_entry(), which marks a cached directory entry for revalidation instead of invalidating it (#367). Unlikeinval_entry(), expiring leaves anything mounted beneath the entry mounted, so it suits an entry merely believed to be stale. ReturnsENOTSUPon a kernel that does not advertiseInitFlags::FUSE_HAS_EXPIRE_ONLY, rather than sending a request such a kernel would answer by invalidating the entry and reporting success - Add
ReplyDirectory::remaining_capacity()andReplyDirectoryPlus::remaining_capacity(), which report how much room is left for entries (#214). Before the first entry is added this is the buffer size the kernel asked for, so a filesystem can size a batch of work to the reply instead of preparing entries only to haveadd()report the buffer full. Theexperimentalasync API exposes the same thing onDirEntListBuilder - Parse the extended
fuse_setxattr_inlayout, makingInitFlags::FUSE_SETXATTR_EXTusable (#357). Enabling that capability previously panicked the session thread on the firstsetxattrand left the filesystem hung, because fuser kept reading the shorter pre-7.33 layout. Asetxattrwhose value length disagrees with its header is now rejected rather than panicking, and one carryingFUSE_SETXATTR_ACL_KILL_SGIDis refused withENOTSUP, sinceFilesystem::setxattrcannot yet be told to clear SGID - Name the file that could not be reached when a mount fails, instead of reporting a bare
"No such file or directory" that could equally mean the mountpoint,
/dev/fuseor thefusermounthelper (#250) - Fix
EBUSYwhen unmounting a filesystem that is still in use, as root on Linux (#686). The unmount is now lazy, as it already was for unprivileged users and as libfuse does, instead of failing and leaving the filesystem mounted with no way to retry - Fix meaningless errors when a mount fails inside libfuse (#406). A failure that libfuse
reported without setting errno was surfaced with an unrelated errno, most visibly
Success (os error 0); such a failure now names the libfuse call it came from, alongside libfuse's own diagnostic on stderr - Dropping a
BackgroundSessionnow unmounts the filesystem and waits for the session to end, guaranteeing thatFilesystem::destroyhas run when drop returns (#239, #411). This restores the pre-0.16 blocking drop behavior. Drop does not wait when the session cannot end: sessions created viaSession::from_fdare left detached (usejoin()after ending them), and so are sessions whose unmount failed or whose connection is still alive a few seconds after the unmount (e.g. a lazily unmounted filesystem still in use). Theguardfield ofBackgroundSessionis now private - usejoin()/umount_and_join() - The pure-rust and
libfuse2mount backends now reportfusermountunmount failures instead of silently ignoring them - Treat
ECONNABORTEDfrom the FUSE device as a clean session end (#212): withFUSE_ABORT_ERRORnegotiated, aborting the connection madeSession::run()andBackgroundSession::umount_and_join()return an error instead of ending normally the way an unmount (ENODEV) does KernelConfig::set_max_write()now rejects values below 4096 with the nearest valid value, per its documented contract (#327). The kernel clampsmax_writeto at least 4096, so a smaller value was accepted but ineffective: write requests of up to 4096 bytes still arrived- Fix inverted mounted-check during session teardown: after the filesystem had already been unmounted externally, fuser would attempt to unmount the mountpoint again, which could unmount an unrelated filesystem mounted at the same path in the meantime
- Apply the same already-unmounted check to the
libfuse2andlibfuse3mount backends, fixing the spurious "Failed to umount filesystem" warning when a session is dropped after an external unmount (#658). As in libfuse, a connection that was aborted (e.g. via fusectl) also counts as already unmounted; its dead mount is left toauto_unmountorfusermount -u -z - Fix special characters in
MountOptionvalues being interpreted as further mount options (#424).MountOption::FSName("foo,ro")used to mount a filesystem namedfoothat was read-only, instead of one namedfoo,ro. Commas and backslashes inFSNameare now escaped for libfuse and the fusermount helpers.SubtypeandCUSTOMvalues containing a comma or backslash, which cannot be escaped consistently, are now rejected bySession::new(), as are NUL bytes in any value, which used to panic. On platforms other than Linux the mount helpers support no escaping, soFSNameis restricted there as well - Fix a per-mount memory leak in the
libfuse3backend: thefuse_sessionis now destroyed on every teardown path, including when mounting fails partway through setup - Fix corruption of pre-1970 timestamps with fractional seconds in
setattr: the nanoseconds were subtracted from instead of added to the (negative) whole second, shifting times by up to two seconds - macOS: forward the
renamex_np(2)flags toFilesystem::rename()asRenameFlags::RENAME_SWAPandRenameFlags::RENAME_EXCL, instead of always passing an empty set. Filesystems that do not implement these operations must now reply with EINVAL for flags they don't handle - macOS: fix garbled
rename()names (#341). fuser assumed macFUSE always sends the extended 16-bytefuse_rename_in, but macFUSE sends it only once the extended rename operations have been negotiated, which fuser never requested. The 8-byte layout it actually received was then parsed at the wrong offset, so the filesystem saw truncated or empty names. fuser now always requests those operations - Remove the
macfuse-4-compatfeature flag, which was set by the build script and selected the extendedfuse_rename_inlayout. That layout is now used for all macOS builds
- Remove deprecated feature flags
abi-* - Rename
mount2()tomount() - Rename
spawn_mount2()tospawn_mount() - Make
Session::run()public, and check mount option conflicts inSession::new() - Add
ReplyEntry::entry_with_ttls()to reply with distinct entry and attribute TTLs - Add support for raw marshalling of
BackingIds across process boundaries viaBackingId::create_raw(),BackingId::into_raw(),ReplyOpen::wrap_backing(), andReplyCreate::wrap_backing() - Fix missing
allow_othermount option on FreeBSD, which causedEPERMfor non-owner users
Major changes:
- Change many integer-based public API parameters to strongly-typed newtypes and bitflags.
This breaking changes affects many of the methods on
Filesystem - Change
Filesystemtrait methods to use&self, and require mounted filesystems to beSend + Sync + 'static - Improve typed error handling across request/reply APIs
- Replace
Vec<MountOption>mount APIs with a structuredConfigAPI, including ACL option handling - Feature flags
abi-7-xxare now ignored and will be removed in 0.18, with compatibility checks moved to runtime behavior - Remove the old ABI-specific feature-flag surface (
abi-7-9throughabi-7-19, plus tooling/docs/examples references) - Add support for multiple event loops per session, which can be enabled via
Config::n_threads - Add experimental async API (
AsyncFilesystem)
Minor changes:
- Rename
BackgroundSession::jointoumount_and_join, returningio::Result<()>instead of panicking - Add
FUSE_DEV_IOC_CLONEsupport and improve passthrough descriptor handling (ReplyCreate,ReplyOpen,BackingId) - Improve passthrough descriptor handling (
ReplyCreate,ReplyOpen,BackingId) - Add
FileTypeconversion from stdFileType - Add option to explicitly choose
libfuse2orlibfuse3, preferlibfuse3by default - Support building without libfuse on BSD
- Remove remaining
osxfusesupport and improvemacfusecompatibility - The path to the
fusermountbinary can be specified with theFUSERMOUNT_PATHenvironment variable allow_rootorallow_othermust be enabled when usingauto_unmount- Remove deprecated
mountandspawn_mount-- usemount2andspawn_mount2instead - Update and expand documentation
Internal changes:
- Improve Linux/BSD/macOS test coverage by migrating mount tests to
fuser-testsand expanding CI - Rework session lifecycle internals (handshake/session startup, destroy ordering, and unmount error propagation)
- Add support for passthrough file descriptors
- Change
KernelConfigcapabilities flags parameters tou64 - Remove feature flags
abi-7-9throughabi-7-18 - Remove
libfusefeature flag from defaults. Linking with libfuse can be enabled with thelibfusefeature flag - Improve macfuse compatibility (note that macfuse remains untested)
- Fix unsound behavior when linking with libfuse3
- Performance optimizations
- Update documentation
- Fix crtime related panic that could occur on MacOS. See PR #322 for details.
- Add file handle argument to
getattr() - Change
poll()to take aPollHandleinstead of au64 - Add low level API for manually mounting or wrapping a fuse file descriptor into a
Session - Fix compatibility with MacFUSE 4.x
- Performance optimizations
- Add support for poll
- Add support for notifications
- ABI 7.11 support is now complete
- Remove dependency on
userscrate - Performance optimizations
- Add method to
Sessionto unmount non-SendFilesystems
- Improve an error message when using libfuse2
- Add
spawn_mount2() - Deprecate
spawn_mount()
- Improve error messages
- Support compiling with musl
- Default
link()&symlink()now return EPERM instead of ENOSYS
forgetandbatch_forgetno longer require thatAllowRootbe set
- Ensure that
Filesystem::destroyis always called, when the filesystem is unmounted - Remove request parameter from
Filesystem::destroy. - Make
fuse_forget_onepublic, so thatFilesystem::batch_forgetcan be implemented by users. - Fix
batch_forget. Previously, it always received an empty list of inodes. - Fix
MountOption::AllowRoot. Previously, using it resulted in a crash. - Fix
MountOption::AutoUnmountso that it works whenAllowRootandAllowOtherare both not set. - Make log messages more verbose (now includes the operation)
- Deprecate
mount() - Remove
FileAttr.padding. This field was added by mistake, and does nothing - Fix crash when receiving an unknown FUSE operation type
- Minor performance optimizations
- Support building with MacFuse 4.x on OSX
- Support configuring max_write & max_readahead via
KernelConfigduringinit - Support configuring filesystem timestamp granularity via
KernelConfig.set_time_granularityduringinit - Support requesting additional capability flags via
KernelConfig.add_capabilitiesduringinit
- Make
spawn_mount()safe - Change
flagsparameter ofcreate(),open(),opendir(),release(),releasedir()to be signed, so that it matches libfuse and the associated constants in libc - Change
flagsparameter ofsetxattr()to be signed, so that it matches libfuse - Change
maskparameter ofaccess()to be signed, so that it matches libfuse and the associated constants in libc - Change lock type parameter of
getlk()andsetlk()to be signed, so that it matches libfuse and the associated constants in libc - Change atime & atime_now and mtime & mtime_now parameters of
setattr()to make their relationship more obvious - Add
lock_ownerand fileflagsparameters toread()andwrite() - Add
umaskparameter tomknod(),mkdir()andcreate() - Add
KernelConfigparameter toinit()to allowFilesystemto configure the kernel connection attributes - Add support for
fallocate(),ioctl(),copy_file_range(), andlseek() - Add support for FUSE_BATCH_FORGET
- Add support for FUSE_READDIRPLUS
- Add support for FUSE_RENAME2
- Add FUSE_WRITE_KILL_PRIV flag for
write() - Add FUSE_WRITEBACK_CACHE flag
- Add FUSE_NO_OPEN_SUPPORT flag
- Add FUSE_PARALLEL_DIROPS flag
- Add FUSE_HANDLE_KILLPRIV flag
- Add FUSE_POSIX_ACL flag
- Add FUSE_ABORT_ERROR flag
- Add FUSE_NO_OPENDIR_SUPPORT flag
- Add FUSE_CACHE_SYMLINKS flag
- Add FUSE_EXPLICIT_INVAL_DATA flag
- Add FUSE_IOCTL_COMPAT_X32 flag
- Add FOPEN_CACHE_DIR flag
- Add FOPEN_STREAM flag
- Add FUSE_MAX_PAGES flag
- Add max_pages, and time_gran support to init code path (these are not currently configurable)
- Add support for ctime in
setattr() - Add support for timestamps before the unix epoch in
getattr()andsetattr()
- Enable FUSE_BIG_WRITES for ABI >= 7.10
- Add FUSE_AUTO_INVAL_DATA constant
- Add ABI 7.20 to 7.31 feature flags. Support for these are incomplete.
- Add support for building with libfuse3
- Add support for building without libfuse/libfuse3 on Linux (i.e. there's now a pure Rust implementation of all features)
- Add
mount2()with improved option API
- Added new feature
serializablethat will enable serde serialization/deserialization forFileType,FileAttr
- Forked as
fusercrate, at https://github.com/cberner/fuser - Add ATIME_NOW and MTIME_NOW support
- Add stubs for ioctl, fallocate, and poll for ABI 7.11
- Offsets to
read,writeandreaddirmethods are signed integers now (breaking change, sorry) - Link
libosxfuseon macOS,libfuseon all other systems
- Fix extended attribute handling (
getxattrandlistxattrmethods changed andReplyXattrwas added) mountnow also returns aResultsince it may fail if the session fails to run- Filenames are now passed as
&OsStrin the filesystem interface - Removed publishing of documentation on GitHub pages. Docs are now available on https://docs.rs/fuse
- Add
FileType::Socket
- Documentation of releases is build by CI now and made available at https://zargony.github.io/rust-fuse
- Fix
unmounton BSD systems - Simplified
libfusedetection withpkg-config ReplyDirectory::sizedwas removed since it was impossible to use it safely
- Update to latest Rust stable - no longer needs nightly Rust
- A filesystem implementation doesn't need to be
Sendanymore to be mounted synchronously - A filesystem implementation doesn't need to be 'static anymore to be mounted asynchronously
- CI tests are covering nightly, beta and stable Rust under OSX and Linux now
- Update to latest Rust nightly
- Fix mounting of filesystems as non-root on Linux systems
- Update to latest Rust nightly
unmountreturns aResultnow since unmounting may fail internally- Fix
unmounton Linux systems - Remove deprecated file types from interface (got rid of
std::old_io) - Introducing
FileType
- Update to latest Rust nightly
spawn_mountreturns aResultnow since starting a new thread may fail- Paths are now passed using
std::path::Path(got rid ofstd::old_path) - FUSE options are now passed as a slice of
OsStrrather than a slice of bytes
- Update to latest Rust nightly
- Update to latest Rust nightly
- Ensure that
ReplyisSendto support asynchronous processing - Add CI testing under Linux
- Update to latest Rust nightly
- Use
build.rsandpkg-configto discoverlibfuse/libosxfuse
Initial release
No versioning (based on make, cargo and crates.io didn't exist yet)