summaryrefslogtreecommitdiff
path: root/sys/miscfs
AgeCommit message (Collapse)Author
2016-09-20Fifo did work around the socket layer. Better call soconnect2()Alexander Bluhm
instead of unp_connect2(). This adds the missing splsoftnet(). Require that socantsendmore() and socantrcvmore() in uipc_socket2.c should be called with splsoftnet(). Found by David Hill; OK mikeb@
2016-09-07Fix fuse node lookups. Currently fusefs nodes in the kernel remember theMartin Natano
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
2016-08-30Use struct stat for storing attributes in fusebufs, because using structMartin Natano
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
2016-08-21There are three callers of update_vattr(). Two of them don't use theMartin Natano
updated struct vattr afterwards, so the call can be removed. Remove both calls and the function itself, inlining the last remaining call. ok millert
2016-08-16There is no sense in doing caching in fusefs. In case of a non-localMartin Natano
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
2016-08-15Neuter fuse_vptofh() and fuse_fhtovp(). I implemented those functionsMartin Natano
under the assumption, that fuse_vget() has reasonable semantics, while this is not the case. fusefs_vget() only functions correctly, if the file in questions has recently been accessed and is still in the vnode cache of the userspace daemon associated with the mount point. As a matter of fact the fuse api doesn't feature a reasonable way to map inode numbers to a handle at all (see struct fuse_operations). ok guenther
2016-08-13Kill FUSE_ROOT_ID and use FUSE_ROOTINO instead. Also, remove one (ino_t)Martin Natano
cast from FUSE_ROOTINO, as it is already included in the #define. ok kettenis
2016-08-12Dedup vnode type information. Fuse stores the vnode type in two places:Martin Natano
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
2016-06-19Remove the lockmgr() API. It is only used by filesystems, where it is aMartin Natano
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
2016-06-07ktrace support for pollfd[] arraysTheo de Raadt
ok guenther
2016-05-26The doforce variable isn't modified anywhere. Also, the only filesystemMartin Natano
left using it is fuse. It has been removed from all other filesystems. ok millert deraadt
2016-04-26Populate all necessary statfs members in .vfs_statfs. cd9660, udf,Martin Natano
msdosfs and nfsv2 don't set f_namemax. ntfs and ext2fs don't set f_namemeax and f_favail. fusefs doesn't set f_mntfromspec, f_favail and f_iosize. Also, make all filesystems use copy_statfs_info(), so that all statfs information is filled in correctly for the (sb != &mp->mnt-stat) case. ok stefan
2016-03-27When pulling and unmounting an umass USB stick, the file systemAlexander Bluhm
could end up in an inconsistent state. The fstype dependent mp->mnt_data was NULL, but the general mp was still listed as a valid mount point. Next access to the file system would crash with a NULL pointer dereference. If closing the device fails, the mount point must go away anyway. There is nothing we can do about it. Remove the workaround for the EIO error in the general unmount code, but do not generate any error in the file system specific unmount functions. OK natano@ beck@
2016-03-19Remove the unused flags argument from VOP_UNLOCK().natano
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
2016-03-17Set mnt_data to NULL after freeing the file system specific mount point.Alexander Bluhm
OK krw@ natano@ as part of a larger diff
2016-02-25Replace a usage of ROOTINO ((ufsino_t)2 with FUSE_ROOTINO ((ino_t)1).natano
The FUSE_ROOTINO define is used everywhere else in fuse, so the mismatch caused a file handle for the filesystem root to be falsely rejected with ESTALE. ok stefan@
2016-02-25fuse doesn't support NFS; prevent a uvm fault caused by claiming otherwisenatano
ok stefan@
2016-01-22Straightforward uiomovei -> uiomove conversion. All size arguments forStefan Kempf
uiomove had unsigned types already. Diff from Martin Natano.
2015-09-23remove lockmgr_printinfo stubs. from Martin NatanoTed Unangst
2015-09-02fairly easy size for free()Theo de Raadt
2015-09-01trivial size for free()Theo de Raadt
2015-07-19basic fh functions. better than panicing!Ted Unangst
from Martin Natano
2015-07-18Change unp_scan() and its callbacks to pass the array of struct file **Philip Guenther
and a count instead of calling the callback on each one, while also renders the 'dispose' argument superfluous. Move unp_*() prototypes from <sys/un.h> to <sys/unpcb.h> ok claudio@ mpi@
2015-05-10Set POLLHUP even if no valid events were specified as per POSIX.Todd C. Miller
Since we use the poll backend for select(2), care must be taken not to set the fd's bit in writefds in this case. A kernel-only flag, POLLNOHUP, is used by selscan() to tell the poll backend not to return POLLHUP on EOF. This is currently only used by fifo_poll(). The fifofs regress now passes. OK guenther@
2015-05-05Now that we have a_fflag in struct vop_poll_args we can handleTodd C. Miller
things like POLLOUT on a read-only fd more sensibly. Previously, any poll events could be used regardless of the actual file flags of the descriptor. The new fifo_poll() is effectively a pared down soo_poll() with slightly different semantics to batter match FIFOs. OK and feedback from guenther@
2015-04-17Tweaks utimensat/futimens handling to always update ctime, even when bothPhilip Guenther
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-02-19set the eofflag in readdir like we're supposed to.Ted Unangst
from Martin Natano
2015-02-12Fix a bug introduced in the last commit that broke EOF handlingTodd C. Miller
in the normal, blocking case. No longer passes regress but that will be fixed later. OK jca@
2015-02-10Convert uiomovei() with a constant size argument to uiomove().Miod Vallat
2015-02-10Switch uiomovei(..., sizeof whatever, ...) to uiomove().Miod Vallat
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- 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@
2014-12-23knfTed Unangst
2014-12-23convert from nointr to waitokTed Unangst
2014-12-16primary change: move uvm_vnode out of vnode, keeping only a pointer.Ted Unangst
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
2014-12-03use arc4random_buf() instead of (r << 32) | r; discussed with matthewTheo de Raadt
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-11-03include sys/unistd.h where needed instead of indirect reliance. ok jsgTed Unangst
2014-10-09Instead of trying to emulate select/poll semantics with respect to EOFTodd C. Miller
by mutating so_state before calling soo_poll(), call soo_poll() normally but avoid setting SS_CANTRCVMORE in the reader's so_state on first open. This fixes EOF detection in select/poll on the reader side when the write side is closed. Also set SS_ISDISCONNECTED when the writer count reaches zero so POLLHUP is set in revents. Unlike Unix domain sockets, we need to clear the EOF indicator after it has been read so that subsequent reads will block waiting for a new writer. This now passes regress.
2014-10-03EOPNOTSUPP for quotactl. from Martin NatanoTed Unangst
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-09-08Actually remove the procfs filesPhilip Guenther
2014-08-10fix kqueue read/write filters for msdosfs and fusefsJonathan Gray
ok tedu@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-07-04Track whether a process is a zombie or not yet fully built via flagsPhilip Guenther
PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's thread data. This eliminates the need for the thread-level SDEAD state. Change kvm_getprocs() (both the sysctl() and kvm backends) to report the "most active" scheduler state for the process's threads. tweaks kettenis@ feedback and ok matthew@
2014-06-04In fusefs_unmount() we need to send the FBT_DESTROY fusebuf only ifSylvestre Gallon
vflush(9) succeed. Problem reported by Helg Bredow. OK sthen@
2014-05-20Add -o max_read=XXX support in fuse. This is needed by usmb to have aSylvestre Gallon
working read() and write(). ok tedu@
2014-05-19Add some consistency in fuse error handling. We need to return ENXIOSylvestre Gallon
when the fuse communication channel is broken and ENOSYS when the libfuse callback does not exist. Reported by Helg Bredow, thanks! ok tedu@
2014-05-06Include <sys/vmmeter.h> directly instead of relying on it beingMartin Pieuchot
pulled by <uvm/uvm_extern.h> and turn uvm_total() into a private function. The preferred way to get memory stats is through the VM_UVMEXP sysctl(3) since VM_METER is just a wrapper on top of it. In the kernel, use `uvmexp' directly instead of uvm_total(). This change does not remove <sys/vmmeter.h> from <uvm/uvm_extern.h> to give some more time to port maintainers to fix their ports. ok guenther@ as part of a larger diff.