summaryrefslogtreecommitdiffstats
path: root/sys/miscfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Tweak lock inits to make the system runnable with witness(4)visa2017-04-201-2/+2
| | | | on amd64 and i386.
* Remove the unused olddp parameter from function dounmount().bluhm2017-01-101-3/+3
| | | | OK mpi@ millert@
* Introduce the NET_LOCK() a rwlock used to serialize accesses to the partsmpi2016-12-191-5/+5
| | | | | | | | | | | of the network stack that are not yet ready to be executed in parallel or where new sleeping points are not possible. This first pass replace all the entry points leading to ip_output(). This is done to not introduce new sleeping points when trying to acquire ART's write lock, needed when a new L2 entry is created via the RT_RESOLVE. Inputs from and ok bluhm@, ok dlg@
* Fifo did work around the socket layer. Better call soconnect2()bluhm2016-09-201-5/+9
| | | | | | | 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@
* Fix fuse node lookups. Currently fusefs nodes in the kernel remember thenatano2016-09-074-53/+40
| | | | | | | | | | | | | | | | | | | | 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
* Use struct stat for storing attributes in fusebufs, because using structnatano2016-08-306-26/+37
| | | | | | | | | 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
* There are three callers of update_vattr(). Two of them don't use thenatano2016-08-213-27/+11
| | | | | | | updated struct vattr afterwards, so the call can be removed. Remove both calls and the function itself, inlining the last remaining call. ok millert
* There is no sense in doing caching in fusefs. In case of a non-localnatano2016-08-162-24/+8
| | | | | | | 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
* Neuter fuse_vptofh() and fuse_fhtovp(). I implemented those functionsnatano2016-08-151-18/+3
| | | | | | | | | | | | 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
* Kill FUSE_ROOT_ID and use FUSE_ROOTINO instead. Also, remove one (ino_t)natano2016-08-131-3/+3
| | | | | | cast from FUSE_ROOTINO, as it is already included in the #define. ok kettenis
* Dedup vnode type information. Fuse stores the vnode type in two places:natano2016-08-124-25/+10
| | | | | | | | | | | 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
* Remove the lockmgr() API. It is only used by filesystems, where it is anatano2016-06-192-6/+7
| | | | | | | | 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
* ktrace support for pollfd[] arraysderaadt2016-06-071-3/+3
| | | | ok guenther
* The doforce variable isn't modified anywhere. Also, the only filesystemnatano2016-05-261-8/+2
| | | | | | left using it is fuse. It has been removed from all other filesystems. ok millert deraadt
* Populate all necessary statfs members in .vfs_statfs. cd9660, udf,natano2016-04-261-2/+10
| | | | | | | | | | 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
* When pulling and unmounting an umass USB stick, the file systembluhm2016-03-271-2/+2
| | | | | | | | | | | | 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@
* Remove the unused flags argument from VOP_UNLOCK().natano2016-03-193-20/+19
| | | | | | torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
* Set mnt_data to NULL after freeing the file system specific mount point.bluhm2016-03-171-1/+2
| | | | OK krw@ natano@ as part of a larger diff
* Replace a usage of ROOTINO ((ufsino_t)2 with FUSE_ROOTINO ((ino_t)1).natano2016-02-251-2/+2
| | | | | | | | 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@
* fuse doesn't support NFS; prevent a uvm fault caused by claiming otherwisenatano2016-02-251-2/+2
| | | | ok stefan@
* Straightforward uiomovei -> uiomove conversion. All size arguments forstefan2016-01-222-7/+7
| | | | | | uiomove had unsigned types already. Diff from Martin Natano.
* remove lockmgr_printinfo stubs. from Martin Natanotedu2015-09-231-2/+1
|
* fairly easy size for free()deraadt2015-09-021-2/+2
|
* trivial size for free()deraadt2015-09-011-6/+6
|
* basic fh functions. better than panicing!tedu2015-07-191-2/+17
| | | | from Martin Natano
* Change unp_scan() and its callbacks to pass the array of struct file **guenther2015-07-181-2/+2
| | | | | | | | 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@
* Set POLLHUP even if no valid events were specified as per POSIX.millert2015-05-101-5/+5
| | | | | | | | 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@
* Now that we have a_fflag in struct vop_poll_args we can handlemillert2015-05-051-13/+34
| | | | | | | | 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@
* Tweaks utimensat/futimens handling to always update ctime, even when bothguenther2015-04-171-3/+4
| | | | | | | atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
* Remove some includes include-what-you-use claims don'tjsg2015-03-142-4/+2
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* set the eofflag in readdir like we're supposed to.tedu2015-02-191-3/+7
| | | | from Martin Natano
* Fix a bug introduced in the last commit that broke EOF handlingmillert2015-02-121-10/+11
| | | | | in the normal, blocking case. No longer passes regress but that will be fixed later. OK jca@
* Convert uiomovei() with a constant size argument to uiomove().miod2015-02-101-2/+2
|
* Switch uiomovei(..., sizeof whatever, ...) to uiomove().miod2015-02-101-2/+2
|
* First step towards making uiomove() take a size_t size argument:miod2015-02-102-9/+9
| | | | | | | - 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@
* knftedu2014-12-231-10/+19
|
* convert from nointr to waitoktedu2014-12-231-3/+3
|
* primary change: move uvm_vnode out of vnode, keeping only a pointer.tedu2014-12-165-5/+10
| | | | | | 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
* use arc4random_buf() instead of (r << 32) | r; discussed with matthewderaadt2014-12-031-2/+2
|
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-3/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* include sys/unistd.h where needed instead of indirect reliance. ok jsgtedu2014-11-031-1/+3
|
* Instead of trying to emulate select/poll semantics with respect to EOFmillert2014-10-091-16/+10
| | | | | | | | | | 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.
* EOPNOTSUPP for quotactl. from Martin Natanotedu2014-10-031-2/+2
|
* remove uneeded proc.h includesjsg2014-09-143-6/+3
| | | | ok mpi@ kspillner@
* Actually remove the procfs filesguenther2014-09-087-2121/+0
|
* fix kqueue read/write filters for msdosfs and fusefsjsg2014-08-101-7/+36
| | | | ok tedu@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-129-26/+26
| | | | after discussions with beck deraadt kettenis.
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-084-11/+4
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Track whether a process is a zombie or not yet fully built via flagsguenther2014-07-041-4/+5
| | | | | | | | | | | 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@
* In fusefs_unmount() we need to send the FBT_DESTROY fusebuf only ifsyl2014-06-041-12/+12
| | | | | | | vflush(9) succeed. Problem reported by Helg Bredow. OK sthen@