#
b6b7fe7c |
| 22-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: remove the vfs.fusefs.sync_resize syctl, correctly this time
In r347547 I intended to remove the vfs.fusefs.sync_resize sysctl, leaving fusefs's behavior as though sync_resize had its defaul
fusefs: remove the vfs.fusefs.sync_resize syctl, correctly this time
In r347547 I intended to remove the vfs.fusefs.sync_resize sysctl, leaving fusefs's behavior as though sync_resize had its default value. But I forgot that I had already turned off sync_resize in my development system's /etc/sysctl.conf.
This commit complete removes the optional behavior that was formerly controlled by sync_resize. There's no need for explicitly calling FUSE_SETATTR after every FUSE_WRITE that extends a file. The daemon can infer that the file is being extended. If this sysctl was added as a workaround for a buggy daemon, there's no clue as to what that daemon may have been.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
16bd2d47 |
| 16-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: Upgrade FUSE protocol to version 7.9.
This commit upgrades the FUSE API to protocol 7.9 and adds unit tests for backwards compatibility with servers built for version 7.8. It doesn't implem
fusefs: Upgrade FUSE protocol to version 7.9.
This commit upgrades the FUSE API to protocol 7.9 and adds unit tests for backwards compatibility with servers built for version 7.8. It doesn't implement any of 7.9's new features yet.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
3d15b234 |
| 15-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: don't track a file's size in two places
fuse_vnode_data.filesize was mostly redundant with fuse_vnode_data.cached_attrs.st_size, but didn't have exactly the same meaning. It was very confus
fusefs: don't track a file's size in two places
fuse_vnode_data.filesize was mostly redundant with fuse_vnode_data.cached_attrs.st_size, but didn't have exactly the same meaning. It was very confusing. This commit eliminates the former. It also eliminates fuse_vnode_refreshsize, which ignored the cache timeout value.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
4d09e76a |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: remove the vfs.fusefs.sync_resize syctl
This sysctl was added > 6.5 years ago for no clear purpose. I'm guessing that it may have had something to do with the incomplete attribute cache. Bu
fusefs: remove the vfs.fusefs.sync_resize syctl
This sysctl was added > 6.5 years ago for no clear purpose. I'm guessing that it may have had something to do with the incomplete attribute cache. But the attribute cache works now. Since there's no clear motivation for this sysctl, it's best to remove it.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
bad4c94d |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: remove the vfs.fusefs.fix_broken_io sysctl
This looks like it may have been a workaround for a specific buggy FUSE filesystem. However, there's no information about what that bug may have b
fusefs: remove the vfs.fusefs.fix_broken_io sysctl
This looks like it may have been a workaround for a specific buggy FUSE filesystem. However, there's no information about what that bug may have been, and the workaround is > 6.5 years old, so I consider the sysctl to be unmaintainable.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
8350cbd8 |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
[skip ci] fusefs: remove an obsolete comment
Sponsored by: The FreeBSD Foundation
|
#
a90e32de |
| 06-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: clear SUID & SGID after a successful write by a non-owner
Reported by: pjdfstest Sponsored by: The FreeBSD Foundation
|
#
9c7ec331 |
| 26-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: fix a deadlock in VOP_PUTPAGES
As of r346162 fuse now invalidates the cache during writes. But it can't do that when writing from VOP_PUTPAGES, because the write is coming _from_ the cache.
fusefs: fix a deadlock in VOP_PUTPAGES
As of r346162 fuse now invalidates the cache during writes. But it can't do that when writing from VOP_PUTPAGES, because the write is coming _from_ the cache. Trying to invalidate the cache in that situation causes a deadlock in vm_object_page_remove, because the pages in question have already been busied by the same thread.
PR: 235774 Sponsored by: The FreeBSD Foundation
show more ...
|
#
21d4686c |
| 24-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: diff reduction between fuse_read_biobackend and ext_read
The main difference is to replace some custom logic with bread. No functional change at this point, but this is one step towards add
fusefs: diff reduction between fuse_read_biobackend and ext_read
The main difference is to replace some custom logic with bread. No functional change at this point, but this is one step towards adding readahead.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
419e7ff6 |
| 20-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: rename the SDT probes from "fuse" to "fusefs"
This matches the new name of the kld.
Sponsored by: The FreeBSD Foundation
|
#
723c7768 |
| 18-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: WIP making FUSE operations interruptible
The fuse protocol includes a FUSE_INTERRUPT operation that the client can send to the server to indicate that it wants to abort an in-progress operat
fusefs: WIP making FUSE operations interruptible
The fuse protocol includes a FUSE_INTERRUPT operation that the client can send to the server to indicate that it wants to abort an in-progress operation. It's required to interrupt any syscall that is blocking on a fuse operation.
This commit adds basic FUSE_INTERRUPT support. If a process receives any signal while it's blocking on a FUSE operation, it will send a FUSE_INTERRUPT and wait for the original operation to complete. But there is still much to do:
* The current code will leak memory if the server ignores FUSE_INTERRUPT, which many do. It will also leak memory if the server completes the original operation before it receives the FUSE_INTERRUPT. * An interrupted read(2) will incorrectly appear to be successful. * fusefs should return immediately for fatal signals. * Operations that haven't been sent to the server yet should be aborted without sending FUSE_INTERRUPT. * Test coverage should be better. * It would be great if write operations could be made restartable. That would require delaying uiomove until the last possible moment, which would be sometime during fuse_device_read.
PR: 236530 Sponsored by: The FreeBSD Foundation
show more ...
|
#
6af6fdce |
| 12-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: evict invalidated cache contents during write-through
fusefs's default cache mode is "writethrough", although it currently works more like "write-around"; writes bypass the cache completely.
fusefs: evict invalidated cache contents during write-through
fusefs's default cache mode is "writethrough", although it currently works more like "write-around"; writes bypass the cache completely. Since writes bypass the cache, they were leaving stale previously-read data in the cache. This commit invalidates that stale data. It also adds a new global v_inval_buf_range method, like vtruncbuf but for a range of a file.
PR: 235774 Reported by: cem Sponsored by: The FreeBSD Foundation
show more ...
|
#
ae909414 |
| 09-Apr-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Add vn_fsync_buf().
Provide a convenience function to avoid the hack with filling fake struct vop_fsync_args and then calling vop_stdfsync().
Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
12292a99 |
| 04-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: correctly handle short writes
If a FUSE daemon returns FOPEN_DIRECT_IO when a file is opened, then it's allowed to write less data than was requested during a FUSE_WRITE operation on that fi
fusefs: correctly handle short writes
If a FUSE daemon returns FOPEN_DIRECT_IO when a file is opened, then it's allowed to write less data than was requested during a FUSE_WRITE operation on that file handle. fusefs should simply return a short write to userland.
The old code attempted to resend the unsent data. Not only was that incorrect behavior, but it did it in an ineffective way, by attempting to "rewind" the uio and uiomove the unsent data again.
This commit correctly handles short writes by returning directly to userland if FOPEN_DIRECT_IO was set. If it wasn't set (making the short write technically a protocol violation), then we resend the unsent data. But instead of rewinding the uio, just resend the data that's already in the kernel.
That necessitated a few changes to fuse_ipc.c to reduce the amount of bzero activity. fusefs may be marginally faster as a result.
PR: 236381 Sponsored by: The FreeBSD Foundation
show more ...
|
#
9f10f423 |
| 03-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: send FUSE_FLUSH during VOP_CLOSE
The FUSE protocol says that FUSE_FLUSH should be send every time a file descriptor is closed. That's not quite possible in FreeBSD because multiple file des
fusefs: send FUSE_FLUSH during VOP_CLOSE
The FUSE protocol says that FUSE_FLUSH should be send every time a file descriptor is closed. That's not quite possible in FreeBSD because multiple file descriptors can share a single struct file, and closef doesn't call fo_close until the last close. However, we can still send FUSE_FLUSH on every VOP_CLOSE, which is probably good enough.
There are two purposes for FUSE_FLUSH. One is to allow file systems to return EIO if they have an error when writing data that's cached server-side. The other is to release POSIX file locks (which fusefs(5) does not yet support).
PR: 236405, 236327 Sponsored by: The FreeBSD Foundation
show more ...
|
#
f8d4af10 |
| 01-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: send FUSE_OPEN for every open(2) with unique credentials
By default, FUSE performs authorization in the server. That means that it's insecure for the client to reuse FUSE file handles betwe
fusefs: send FUSE_OPEN for every open(2) with unique credentials
By default, FUSE performs authorization in the server. That means that it's insecure for the client to reuse FUSE file handles between different users, groups, or processes. Linux handles this problem by creating a different FUSE file handle for every file descriptor. FreeBSD can't, due to differences in our VFS design.
This commit adds credential information to each fuse_filehandle. During open(2), fusefs will now only reuse a file handle if it matches the exact same access mode, pid, uid, and gid of the calling process.
PR: 236844 Sponsored by: The FreeBSD Foundation
show more ...
|
#
5fccbf31 |
| 30-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: don't force direct io for files opened O_WRONLY
Previously fusefs would treat any file opened O_WRONLY as though the FOPEN_DIRECT_IO flag were set, in an attempt to avoid issuing reads as pa
fusefs: don't force direct io for files opened O_WRONLY
Previously fusefs would treat any file opened O_WRONLY as though the FOPEN_DIRECT_IO flag were set, in an attempt to avoid issuing reads as part of a RMW write operation on a cached part of the file. However, the FUSE protocol explicitly allows reads of write-only files for precisely that reason.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
080518d8 |
| 29-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: convert debug printfs into dtrace probes
fuse(4) was heavily instrumented with debug printf statements that could only be enabled with compile-time flags. They fell into three basic groups:
fusefs: convert debug printfs into dtrace probes
fuse(4) was heavily instrumented with debug printf statements that could only be enabled with compile-time flags. They fell into three basic groups:
1. Totally redundant with dtrace FBT probes. These I deleted. 2. Print textual information, usually error messages. These I converted to SDT probes of the form fuse:fuse:FILE:trace. They work just like the old printf statements except they can be enabled at runtime with dtrace. They can be filtered by FILE and/or by priority. 3. More complicated probes that print detailed information. These I converted into ad-hoc SDT probes.
Also, de-inline fuse_internal_cache_attrs. It's big enough to be a regular function, and this way it gets a dtrace FBT probe.
This commit is a merge of r345304, r344914, r344703, and r344664 from projects/fuse2.
Reviewed by: cem MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19667
show more ...
|
#
98852a32 |
| 28-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: fix error handling in fuse_vnop_strategy
Reported by: cem Sponsored by: The FreeBSD Foundation
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
#
ff511f1f |
| 11-Mar-2019 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r344996
|
#
84c4fd1f |
| 08-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
fuse(4): add dtrace probe for illegal short writes
Sponsored by: The FreeBSD Foundation
|
#
9a6a45d8 |
| 07-Mar-2019 |
Conrad Meyer <cem@FreeBSD.org> |
fuse: switch from DFLTPHYS/MAXBSIZE to maxcachebuf
On GENERIC kernels with empty loader.conf, there is no functional change. DFLTPHYS and MAXBSIZE are both 64kB at the moment. This change allows la
fuse: switch from DFLTPHYS/MAXBSIZE to maxcachebuf
On GENERIC kernels with empty loader.conf, there is no functional change. DFLTPHYS and MAXBSIZE are both 64kB at the moment. This change allows larger bufcache block sizes to be used when either MAXBSIZE (custom kernel) or the loader.conf tunable vfs.maxbcachebuf (GENERIC) is adjusted higher than the default.
Suggested by: ken@
show more ...
|
#
cf169498 |
| 28-Feb-2019 |
Alan Somers <asomers@FreeBSD.org> |
fuse(4): convert debug printfs into dtrace probes
fuse(4) was heavily instrumented with debug printf statements that could only be enabled with compile-time flags. They fell into three basic groups
fuse(4): convert debug printfs into dtrace probes
fuse(4) was heavily instrumented with debug printf statements that could only be enabled with compile-time flags. They fell into three basic groups:
1) Totally redundant with dtrace FBT probes. These I deleted. 2) Print textual information, usually error messages. These I converted to SDT probes of the form fuse:fuse:FILE:trace. They work just like the old printf statements except they can be enabled at runtime with dtrace. They can be filtered by FILE and/or by priority. 3) More complicated probes that print detailed information. These I converted into ad-hoc SDT probes.
Sponsored by: The FreeBSD Foundation
show more ...
|