| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
|
|
|
|
| |
While here prefix kernel-only EV flags with two underbars.
Suggested by kettenis@, ok visa@
|
|
|
|
|
|
|
|
|
| |
Adapt FS kqfilters to always return true when the flag is set and bypass
the polling mechanism of the NFS thread.
While here implement a write filter for NFS.
ok visa@
|
|
|
|
|
|
| |
for example, with locking assertions.
OK mpi@, anton@
|
|
|
|
|
|
| |
adding more filter properties without cluttering the struct.
OK mpi@, anton@
|
|
|
|
|
| |
into read-only data segment.
OK deraadt@ tedu@
|
|
|
|
|
|
| |
make the structs const so that the data are put in .rodata.
OK mpi@, deraadt@, anton@, bluhm@
|
|
|
|
|
|
|
|
|
| |
serializing both read/write operations using the existing file mutex.
The vnode lock still grants exclusive write access to the offset; the
mutex is only used to make the actual write atomic and prevent any
concurrent reader from observing intermediate values.
ok mpi@ visa@
|
|
|
|
|
|
| |
https://marc.info/?l=openbsd-cvs&m=156277704122293&w=2
ok anton@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as part of the effort to unlock the kernel. Instead of relying on the
vnode lock, introduce a dedicated lock per file. Exclusive write access
is granted using the new foffset_enter and foffset_leave API. A
convenience function foffset_get is also available for threads that only
need to read the current offset.
The lock acquisition order in vn_write has been changed to match the one
in vn_read in order to avoid a potential deadlock. This change also gets
rid of a documented race in vn_read().
Inspired by the FreeBSD implementation.
With help and ok mpi@ visa@
|
|
|
|
|
|
|
|
| |
sets all members of struct vattr to VNOVAL (-1) instead of 0, which is
what is appropriate here. The VATTR_NULL() macro is intended for
initialising struct vattr when setting attributes.
ok mpi@
|
|
|
|
|
|
|
| |
kernel calls to ensure that the UVM cache for memory mapped files is
up to date.
ok mpi@
|
|
|
|
|
|
|
| |
Currently ignores the a_waitfor argument and always invokes the file
system's fsync implementation synchronously.
ok mpi@
|
|
|
|
|
|
| |
implementations. Rely on the VFS layer to do the checking.
OK mpi@, helg@
|
| |
|
|
|
|
|
|
|
|
| |
file system can access it unless the allow_other mount options is
specified. The allow_other mount option makes the file system
available to other users just like any other mounted file system.
ok mpi@
|
|
|
|
|
|
|
|
| |
Don't ask file system to check file access; always behave as if
default_permissions option was specified. (this may change in a later
commit)
ok mpi@
|
|
|
|
|
|
|
| |
super-user, the mode includes the sticky bit (S_ISVTX), and path
does not refer to a directory.
ok mpi@
|
|
|
|
|
|
| |
unlocking the directory vnode.
OK mpi@, helg@
|
|
|
|
|
|
| |
doesn't implement it.
ok mpi@
|
|
|
|
|
|
|
|
|
| |
VOP_CLOSE(9). The associated FUSE file handle is however not closed at this
time and is instead closed on VOP_RELEASE(9) because that's the only time
it's guaranteed to be no longer used. Directory handles are now only closed
on VOP_RELEASE(9) for the same reason.
ok mpi@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
|
|
| |
opened multiple times (either from the same process or different
processes) then FUSE will not reliably return the directory entries to
both file descriptors.
ok mpi@
|
|
|
|
|
|
| |
unnecessary because curproc always does the locking.
OK mpi@
|
|
|
|
|
|
|
| |
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.
OK mpi@, deraadt@
|
|
|
|
|
|
|
| |
support FBT_CREATE. Fall back to FBT_MKNOD + FBT_OPEN so that a valid
sequence of FUSE messages is sent to the file system when creating files.
input from mpi@, otto@
|
|
|
|
|
|
| |
Now aligns with link(2) man page and ffs regress tests.
ok phessler@, jca@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
| |
Endless loop if directory nested more than one level from root of file system
Current directory not found if the parent directory contains more children than
will fit in the buffer passed to VOP_READDIR(9)
Open and close directory in fusefs_readdir if dir is not already open.
Now behaves as if readdir_ino option was passed to fuse so that directories in
path have a valid ino.
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parent inode number for ".." lookups. This only works until the kernel
starts to reuse vnodes and the parent's vnode is reclaimed and the ino
to path mapping is removed from the userland process by libfuse. Fix
this by using reference counting in libfuse, so that parent mapping are
retained as long as a child uses them. Also, don't free the root node.
This commit resolves following issue:
$ doas fuse-zip ~/Downloads/foo.zip /mnt
$ ls /mnt
openbsd-www
$ grep -IR foo /usr/src > /dev/null # force vfs to reclaim vnodes
$ ls /mnt
ls: /mnt: No such file or directory
$
ok tedu
|
|
|
|
|
|
|
|
|
| |
vattr in userspace is suboptimal as some related helpers are not
available, e.g. VATTR_NULL() and IFTOVT(). The conversion is now done in
the kernel where it belongs. As a side effect the <sys/vnode.h> include
can be removed from libfuse.
tweaks and ok guenther
|
|
|
|
|
|
|
| |
updated struct vattr afterwards, so the call can be removed. Remove both
calls and the function itself, inlining the last remaining call.
ok millert
|
|
|
|
|
|
|
| |
filesystem the tree can change behind our back, resulting in stale cache
entries. "The only winning move is not to play."
ok tedu beck mpi
|
|
|
|
|
|
|
|
|
|
|
| |
vtype in struct fusefs_node and v_type in struct vnode. Given the fact,
that fusefs_node structs are never allocated without an associated vnode
and those two fields are always in sync, one of those locations is
superfluous.
While there remove the unused nlookup field.
ok mpi
|
|
|
|
|
|
|
|
| |
trivial change to use rrw locks instead. All it needs is LK_* defines
for the RW_* flags.
tested by naddy and sthen on package building infrastructure
input and ok jmc mpi tedu
|
|
|
|
|
|
| |
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
|
|
|
|
| |
uiomove had unsigned types already.
Diff from Martin Natano.
|
| |
|
|
|
|
|
|
|
| |
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and
to correctly handle a timestamp of -1.
ok millert@
|
|
|
|
| |
from Martin Natano
|
|
|
|
|
|
|
| |
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@
|
|
|
|
|
|
| |
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
|
|
|
| |
ok tedu@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
working read() and write().
ok tedu@
|
|
|
|
|
|
|
|
| |
when the fuse communication channel is broken and ENOSYS when the
libfuse callback does not exist.
Reported by Helg Bredow, thanks!
ok tedu@
|
|
|
|
|
|
| |
through uvm/uvm.h and add proper includes for function definitions.
ok syl@
|
|
|
|
| |
ok tedu@
|
|
|
|
| |
ok beck@
|
|
|
|
|
| |
OK tedu@
"it looks good to me" from guenther@
|