FUSE extends macOS by adding support for user space file systems
OTHER License
Bot releases are visible (Hide)
Published by bfleischer about 8 years ago
Update libosxfuse from version 2.9.6 to 2.9.7
Fix ".." path handling for delete lookups
Make sure to call fuse_vget_i()
only after performing a FUSE_LOOKUP
request. Calling it after a FUSE_GETATTR
request will lead to a kernel panic.
Resolves osxfuse/osxfuse#298
Lock parent directory when removing entry
When removing a directory entry HFS and NFS lock the vnode that is to be removed and its parent directory vnode. However, Apple's fallback implementation for non-thread-safe 32 bit file systems only locks the directory entry vnode.
The osxfuse locking mechanism is inspired by Apple's fallback implementation. While it is not strictly required to lock the parent directory vnode as well, it seems to be good practice to do so.
Addresses osxfuse/osxfuse#299
Published by bfleischer about 8 years ago
Remove obsolete task working set cache handling
When mounting a volume with the noubc
option the kernel extension used to set the noexec
flag for the mount in order to also disable the task working set page cache on disk. However, since the task working set mechanism has been removed in Mac OS X 10.5 the noexec
flag is no longer needed.
Ignore vnode name cache hits when creating a file
See osxfuse/kext#4 for details.
Always set O_EXCL
for FUSE_CREATE
requests
The macOS kernel expects all create calls to return EEXIST
in case the file already exists, regardless of whether O_EXCL
was specified or not.
Resolves osxfuse/osxfuse#209
Add mount-time option excl_create
If the mount-time option excl_create
is specified, the O_EXCL
flag will only be set for "truly" exclusive creates, i.e. create calls for which the initiator explicitly set the O_EXCL
flag. This allows distributed file systems to determine whether or not to acquire a potentially costly lock to prevent remote create races. Nonetheless, the file system still needs to make sure that there are no local create races.
Fix mount-time option parsing
Fixes the following error when using the daemon_timeout
mount-time option in combination with a volume name containing the word "union".
mount_osxfuse: invalid value for argument daemon_timeout
Don't kill the file system on short reads
A FUSE user space server receives file system requests from the FUSE device by allocating some memory and calling read(2)
. Obviously, the request must fit into that buffer. If it doesn't, we used to kill the file system.
Linux FUSE handles short reads differently. Instead of killing the file system it returns EIO
or E2BIG
(in case of FUSE_SETXATTR
requests). This change aims to replicate the Linux behavior on macOS.
Addresses osxfuse/osxfuse#293
Remove callbacks for interrupted tickets
Make sure to remove a ticket's callback when marking it as answered. Otherwise the ticket will be retained by the callback queue until the volume is unmounted.
Minor optimizations and code cleanup
Switch to secure website URL
Published by bfleischer over 8 years ago
Change name to FUSE for macOS
Add experimental support for macOS 10.12 and Xcode 8
Disable Objective-C garbage collection for FUSE preference pane
Using garbage collection is no longer supported on macOS 10.12. However, on Mac OS X 10.6 and 10.7 all 64-bit preference panes are required to use garbage collection. 32-bit preference panes may use manual reference counting.
As a result the System Preferences application will need to relaunch on Mac OS X 10.6 and 10.7 in 32-bit mode to run the FUSE preference pane. For details see Apple's Preference Pane Programming Guide.
Modernize FUSE kernel extension Xcode project
Clean up license
Published by bfleischer over 8 years ago
Fix invisible volumes on OS X 10.8 and earlier
Wait for FUSE volume to be initialized instead of faking vnop_getattr
for the volume's root vnode. Faking attributes results in Finder not showing the mounted volume on OS X 10.8 and earlier.
Published by bfleischer over 8 years ago
Optimize vnop_readdir
mode VNODE_READDIR_EXTENDED
in kernel extension
Our user space buffer for VNODE_READDIR_EXTENDED
needs to be smaller since re-packing will expand each struct fuse_dirent
.
The worse case (when the name length is 8) corresponds to a struct direntry
size of 40 bytes (8-byte aligned) and a struct fuse_dirent
size of 32 bytes (8-byte aligned). So having a buffer that is 4/5 the size will prevent us from reading more than we can pack.
Published by bfleischer over 8 years ago
Published by bfleischer over 8 years ago
Update libosxfuse from version 2.9.5 to 2.9.6
Update MacFUSE compatibility layer from version 2.7.4 to 2.7.5
Use weak linking to make OSXFUSE.framework backward compatible
When a symbol in a framework is defined as weakly linked, the symbol does not have to be present at runtime. This allows taking advantage of new features while still supporting older versions of the framework.
To build a file system that still supports FUSE for OS X 2.x define the following preprocessor macro before importing the framework header.
#define GM_VERSION_MIN_REQUIRED GM_OSXFUSE_2
Make sure to check for the existence of weakly linked symbols before using them, otherwise the file system might crash.
Bump number of osxfuse devices to 64. This addresses issue osxfuse/osxfuse#277.
Lower minimum file system block size to 128 bytes. This addresses issue Finder showing wrong sizes through statfs.
Increase maximum file system block size from MAXPHYS
(128 KiB) to MAXBSIZE
(1 MiB)
Clean up vnop_exchange
operation in kernel extension
Use vnode_update_identity()
instead of fuse_kludge_exchange()
for updating the vnodes' names and parents. This renders fuse_kludge_exchange()
obsolete.
Implement new style mount process
When mounting a FUSE volume on Linux, fusermount
opens the FUSE device and passes the file descriptor back to libfuse
.
However, on OS X libosxfuse
used to be responsible for locating a free FUSE device, opening it, and then passing the file descriptor to mount_osxfuse
. For this to work libosxfuse
needs to be aware of low level implementation details like the number of registered FUSE devices.
In order to decouple libosxfuse
from the FUSE kernel extension the mount process has been revised to match FUSE on Linux. mount_osxfuse
will locate a free FUSE device, open it, and then pass the file descriptor back to libosxfuse
.
Update mount_osxfuse
environment variables
MOUNT_FUSEFS_SAFE
MOUNT_FUSEFS_CALL_BY_LIB
MOUNT_OSXFUSE_CALL_BY_LIB
Refactor kernel extension loader
Remove unused FUSEDEVIOCSETIMPLEMENTEDBITS
ioctl
Published by bfleischer over 8 years ago
Update libosxfuse to version 2.9.5
Disable CUSE support in libosxfuse
The osxfuse kernel extension does not support the CUSE protocol.
Send interrupt request on daemon timeout
Send an interrupt request to give the file system daemon a chance to handle the timeout. If the daemon does not respond to the interrupt request within daemon_timeout
seconds, the file system will be marked dead. Previous version of osxfuse deadened the volume right away without giving the daemon proper warning.
This addresses issue osxfuse/osxfuse#261.
Be more verbose in case vnop_readdir
fails
Finder and ls
have the nasty habit of ignoring errors returned by vnode operation readdir
. This might result in files missing from directory listings or directories appearing empty, even though they are not. One way to trigger this issue is returning a file name longer than 255 bytes in the the FUSE_READDIR
callback. Starting with this release readdir
errors are logged in system.log
.
This addresses issue osxfuse/osxfuse#265.
Published by bfleischer almost 9 years ago
The kernel extension does no longer use the first free slot when registering osxfuse character devices. In practice there are kernel internal devices that use absolute index values, which will stomp on free-slot based assignments that happen before them. Slot 12 is considered a safe starting index for Mac OS X 10.5 to 10.7, 24 for OS X 10.8 and later. See bsd/kern/bsd_stubs.c for details.
Update pkg-config files
-pthread
option from Libs
line in osxfuse.pc
and macfuse.pc
as it is not required on OS X and causes issues when using clang. See osxfuse/osxfuse#256 for details.Libs.private
line from osxfuse.pc
. libosxfuse does not support static linking.Update MacFUSE compatibility layer from FUSE version 2.7.3 to 2.7.4.
Add instructions for using Homebrew instead of MacPorts to install the required third-party build tools autoconf, automaker, libtool, and gettext.
Improve compatibility with Finder on OS X 10.11
Unless allow_root
or allow_other
is set we limit vnode operations to the user that mounted the file system. Starting with OS X 10.11 DesktopServicesHelper
, which is running as root, calls access(2)
on behalf of Finder when trying to delete a directory. Blocking this request results in Finder aborting the delete process. Therefore we are no longer enforcing allow_root
or allow_other
for vnop_access
.
Fix mount-init-unmount race condition
The volume might be unmounted before we are able to complete the asynchronous FUSE_INIT
process. This could result in a "trying to interlock destroyed mutex" kernel panic.
Fix mount-init-abi race condition
Wait until the FUSE session is initialized before generating user space requests. We do not know which ABI version to use until the initialization process is complete.
Published by bfleischer almost 9 years ago
Published by bfleischer almost 9 years ago
Add a workaround for an issue on OS X 10.8 that triggers a segmentation fault in kextd
when loading the FUSE kernel extension. kextd
crashes when trying to load kernel extensions at paths containing two instances of "/../". Apple has fixed the bug in OS X 10.9.
Determine maximum I/O size at runtime instead of compile time. This allows us to remove the separate FUSE kernel extension for OS X 10.7. On Mac OS X 10.6 to 10.8 the Mac OS X 10.6 FUSE kernel extension is used.
Switch from gcc-4.2
to llvm-gcc
for Mac OS X 10.6 kernel extension.
Set attr_valid
to zero when initializing vnodes.
When creating a vnode its cached attributes are not initialized, therefore the vnode's attr_valid
field should be zero instead of attr_timeout
.
This fixes issue osxfuse/osxfuse#192.
Improve build script
.Trashes
directory from release disk image..DS_Store
file of release disk image. This allows for headless builds.See osxfuse/osxfuse#191 for details.
Published by bfleischer almost 9 years ago
Add support for the following OS X specific FUSE capability flags:
FUSE_CAP_ALLOCATE
FUSE_CAP_EXCHANGE_DATA
FUSE_CAP_XTIMES
FUSE_CAP_CASE_INSENSITIVE
For details see the "capable" and "want" fields of struct fuse_conn_info
.
The capability flags FUSE_CAP_ALLOCATE
, FUSE_CAP_EXCHANGE_DATA
, and FUSE_CAP_XTIMES
are set automatically if the corresponding callbacks are implemented by the user space file system, e.g. FUSE_CAP_ALLOCATE
is set if the the file system implements the fallocate callback. For details see fuse.c.
FUSE_CAP_CASE_INSENSITIVE
needs to be set by the file system manually in case the file system is case insensitive.
The following preprocessor macros are now deprecated:
FUSE_ENABLE_SETVOLNAME()
FUSE_ENABLE_XTIMES()
FUSE_ENABLE_CASE_INSENSITIVE()
Add the following two dictionary keys to the Objective-C Framework:
kGMUserFileSystemVolumeSupportsAllocateKey
kGMUserFileSystemVolumeSupportsExchangeDataKey
The keys can be used in the attributesOfFileSystemForPath:error: callback to set the corresponding libfuse capability flags FUSE_CAP_ALLOCATE
and FUSE_CAP_EXCHANGE_DATA
manually.
Switch back from SourceForge to GitHub for hosting release binaries.
Published by bfleischer almost 9 years ago
The FUSE kernel extension used to treat all signals, received while waiting for the user space file system daemon to respond to a file system request, as fatal. On OS X there is no public API to block signals in kernel mode or to determine which signal caused the current interrupt. This is why there have been only two options:
Before version 3.0.9 all signals were treated as fatal. Between those two options this one is the "safer" one, as we do not want file systems to hang the whole system. The problem is that it can become virtually impossible to complete any I/O operation under high signal pressure on a high latency (e.g. network) file system.
In 3.0.9, if a process that is issuing a FUSE file system operation is interrupted, the following will happen:
FUSE_INTERRUPT
request is queued.FUSE_INTERRUPT
request is queued.SIGKILL
or unhandled fatal signal), then the request is marked as answered and returns immediately.This fixes issue osxfuse/osxfuse#213.
Improve support for sigaction(2)
flag SA_RESTART
. This fixes issue osxfuse/osxfuse#228.
Published by bfleischer almost 9 years ago
Ignore vfs_update_vfsstat()
error on mount.
Do not treat vfs_update_vfsstat()
failing when mounting a FUSE volume as a fatal error. The worst that can happen is vfsstat
being stale.
Published by bfleischer almost 9 years ago
Improve compatibility with Finder. Starting with OS X 10.9 syspolicyd
(which is running as root) calls getxattr(2)
when opening items in Finder. Blocking these calls results in Finder displaying an error message. Therefore we are no longer blocking getxattr(2)
calls by root even if allow_root
or allow_other
is not set.
This fixes issue osxfuse/osxfuse#162.
Fix select(2)
for FUSE devices on OS X 10.11. The issue was caused by a kernel private struct that has changed between OS X 10.10 and 10.11.
See select(2) on channel fd hangs and makes system unstable on El Capitan for details.
Fix unified buffer cache invalidation error when expanding files. Unless the file did end on a page boundary we are now invalidating the last page of the file's unified buffer cache manually.
This fixes issue osxfuse/osxfuse#237.
Published by bfleischer about 9 years ago
Improve compatibility with Finder on OS X 10.11
Unless allow_root
or allow_other
is set we limit vnode operations to the user that mounted the file system. Starting with OS X 10.11 DesktopServicesHelper
, which is running as root, calls stat(2)
on behalf of Finder when trying to delete a directory. Blocking this request results in Finder aborting the delete process. Therefore we are no longer enforcing allow_root
or allow_other
for vnop_getattr
.
Fix error handling for FUSE_NOTIFY_INVAL_INODE
notifications. See osxfuse/osxfuse#233 for details.
Fix race condition in vfsop_sync()
that can trigger a "Attempted to lock max-locked recursive lock" kernel panic. See osxfuse/osxfuse#232 for details.
Fetch new releases over HTTPS. See osxfuse/prefpane#2 for details.
Published by bfleischer about 9 years ago
Update libosxfuse to version 2.9.4
getattr()
and fgetattr()
to zero in all cases.fuse_remove_signal_handlers()
to properly restore the default signal handler.Refactor the non-portable libfuse function fuse_purge_np()
to use the the standard function fuse_lowlevel_notify_inval_inode()
instead of of the non-portable FUSEDEVIOCALTERVNODEFORINODE
ioctl.
The non-portable libfuse functions fuse_purge_np()
and fuse_knote_np()
are now obsolete and therefore deprecated.
Fix vnode invalidation notification handling in FUSE kernel extension by updating the vnode's attributes upon receiving a FUSE_NOTIFY_INVAL_INODE
notification to detect remote file size changes. See osxfuse/osxfuse#229 for details.
Cache vnode attributes when creating vnodes. This guarantees that va_iosize
has been initialized before processing read or write requests. A va_iosize
of zero bytes will trigger an infinite number of zero byte reads or writes. See osxfuse/osxfuse#224 for details.
Invalidate directory attributes when creating file. When creating a file using open(2)
and O_CREAT
, POSIX requires that the parent directory's ctime and mtime be updated (if the file did not exist):
If O_CREAT is set and the file did not previously exist, upon
successful completion, open() shall mark for update the st_atime,
st_ctime, and st_mtimefields of the file and the st_ctime and
st_mtime fields of the parent directory.
For details see Minor bug with directory mtimes and O_CREAT.
Hide xcodebuild
output when building osxfuse if verbose flag is not set.
Published by bfleischer over 9 years ago
FUSE_OPEN
messages to the file system daemon has always been 0.Published by bfleischer over 9 years ago
Add support for the standard libfuse capability flag ATOMIC_O_TRUNC
.
Write back changes to memory mapped files as soon as possible.
munmap(2)
man page states:
If the mapping maps data from a file (MAP_SHARED), then the memory will eventually be written back to disk if it's dirty. This will happen automatically at some point in the future (implementation dependent).
In previous releases changes to memory mapped might not be written back until the volume is being unmounted. This behavior might result in data inconsistencies in case of distributed or network file systems. Starting with this release changes to memory mapped files are being written back as soon as the file is being unmapped from memory.
Improve support for 64 bit inodes by implementing mode VNODE_READDIR_EXTENDED
of the readdir VFS callback. In previous releases readdir used to truncate inodes to 32 bits.
Add support for Xcode 6.3 and 6.4