summaryrefslogtreecommitdiff
path: root/sys/isofs
AgeCommit message (Collapse)Author
2024-10-18Put the bowels of the various VOP_PRINT routines underMiod Vallat
defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG) as they won't be used otherwise. Shaves a few bytes off installation kernels. ok kn@ semarie@
2024-09-20remove unneeded semicolons; checked by millert@Jonathan Gray
2024-09-12Ensure that file names passed back by readdir do not include a '/'Claudio Jeker
character. The '/' char is the path separator and is not allowed in any filename. NFS specific report by Apple Security Engineering and Architecture (SEAR). Input from guenther@ and millert@ OK beck@ miod@
2024-05-13vfs: VOP_REMOVE: move vnode unlocking and ref dropping to FS-indep partSebastien Marie
while here, ensure all vop_remove field are set, and always call the function. the change is very conservative: it only adds vnode ref drop/unlock where it was absent because it should be unreachable (and if it wasn't, it should fix things). ok miod@
2024-05-13remove prototypes with no matching functionJonathan Gray
ok mpi@
2024-05-12vfs: struct vops: show all members, even if NULLSebastien Marie
In order to help code maintenance, explicitly add all `struct vops` members with the current value (if not present, it is NULL), still using the C99 notation. ok miod@
2024-04-13correct indentationJonathan Gray
no functional change, found by smatch warnings ok miod@ bluhm@
2023-09-08Remove the remnants of the leftover selinfo from vnode(9) layer. JustVitaliy Makkoveev
mechanical 'selinfo' to 'klist' replacement in 'vnode' structure because knote(9) API is already used. <sys/selinfo.h> headers added where is was required. ok bluhm
2023-07-17vfs: drop several macros hidding eopnotsuppSebastien Marie
make it obvious in the vfsops assignment that an op isnt supported. from thib4711 at mailbox dot org ok claudio@
2023-04-13remove duplicate includesJonathan Gray
ok deraadt@ miod@ krw@
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2022-09-01Stop setting d_bbsize and d_sbsize. Nobody has paidKenneth R Westerback
any attention for some time. ok otto@ as part of larger diff
2022-06-26Remove unused VOP_POLL().Visa Hankala
OK mpi@
2022-01-11spellingJonathan Gray
ok jmc@
2021-12-12Add vnode parameter to VOP_STRATEGY()Visa Hankala
Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling the correct vop_strategy callback. Now the vnode is also available in the callback. OK mpi@
2021-12-11Clarify usage of __EV_POLL and __EV_SELECTVisa Hankala
Make __EV_POLL specific to kqueue-based poll(2), to remove overlap with __EV_SELECT that only select(2) uses. OK millert@ mpi@
2021-10-19vnode: do not manipulate vnode lock directlySebastien Marie
use VOP_LOCK / VOP_UNLOCK wrappers. VOP_LOCK() is prefered over vn_lock() here in order to keep equivalent code. ok mpi@ visa@ (as part of larger diff)
2021-10-02vfs: merge *_badop to vop_generic_badopSebastien Marie
It replaces spec_badop, fifo_badop, dead_badop and mfs_badop, which are only calls to panic(9), to one unique function vop_generic_badop(). No intented behaviour changes (outside the panic message which isn't the same). ok mpi@
2021-03-24cd9660, mfs: do not hide generic vop functions behind #defineSebastien Marie
It makes clearer which vop functions are real fileystem-implementations and which one are only stubs. No functional changes are intented. ok visa@
2021-03-05deregisterJonathan Gray
2021-03-05ansiJonathan Gray
2020-12-25Refactor klist insertion and removalVisa Hankala
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@
2020-06-23Revert previous. hashfree() just calls free() which handles NULL withKenneth R Westerback
aplomb. 16 lines of 'C' can be so hard to grok at a glance. Prompted to look more closely at those 16 lines by mpi@.
2020-06-23hashfree() doesn't like NULL, so check for NULL if NULL is aKenneth R Westerback
possibility. i.e. when bailing out before calling hashinit().. COVERITY 1452907 ok mpi@
2020-06-11Rename poll-compatibility flag to better reflect what it is.Martin Pieuchot
While here prefix kernel-only EV flags with two underbars. Suggested by kettenis@, ok visa@
2020-06-08Use a new EV_OLDAPI flag to match the behavior of poll(2) and select(2).Martin Pieuchot
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@
2020-04-07Abstract the head of knote lists. This allows extending the lists,Visa Hankala
for example, with locking assertions. OK mpi@, anton@
2020-02-27Remove unused "struct proc *" argument from the following functions:Martin Pieuchot
- ufs_chown() & ufs_chmod() - ufs_reclaim() - ext2fs_chown() & ext2fs_chmod() - ntfs_ntget() & ntfs_ntput() - ntfs_vgetex(), ntfs_ntlookup() & ntfs_ntlookupfile() While here use `ap->a_p' directly when it is only required to re-enter the VFS layer in order to help reducing the loop. ok visa@
2020-02-20Replace field f_isfd with field f_flags in struct filterops to allowVisa Hankala
adding more filter properties without cluttering the struct. OK mpi@, anton@
2020-01-20struct vops is not modified during runtime so use const which moves eachClaudio Jeker
into read-only data segment. OK deraadt@ tedu@
2019-12-31Use C99 designated initializers with struct filterops. In addition,Visa Hankala
make the structs const so that the data are put in .rodata. OK mpi@, deraadt@, anton@, bluhm@
2019-12-26Convert struct vfsops initializer to C99 style.Alexander Bluhm
OK visa@
2019-08-05Allow concurrent reads of the f_offset field of struct file byanton
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@
2019-07-25vinvalbuf(9): tlseep -> tsleep_nsec(9); ok millert@cheloha
2019-07-12Revert anton@ changes about read/write unlockingsolene
https://marc.info/?l=openbsd-cvs&m=156277704122293&w=2 ok anton@
2019-07-10Make read/write of the f_offset field belonging to struct file MP-safe;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@
2019-01-20remove unused i_lockf member from struct iso_node; ok tedu@ visa@anton
2018-09-26Move the allocating and freeing of mount points intoVisa Hankala
dedicated functions. OK deraadt@ mpi@
2018-05-27Drop unnecessary `p' parameter from vget(9).Visa Hankala
OK mpi@
2018-05-02Remove proc from the parameters of vn_lock(). The parameter isVisa Hankala
unnecessary because curproc always does the locking. OK mpi@
2018-04-28Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is alwaysVisa Hankala
curproc that does the locking or unlocking, so the proc parameter is pointless and can be dropped. OK mpi@, deraadt@
2018-03-28Use RWL_IS_VNODE with locks that are acquired through VOP_LOCK(),Visa Hankala
to appease WITNESS. ext2fs and ffs already use the flag. The same locking pattern appears with other file systems too, so this patch addresses the remaining cases. OK mpi@
2018-02-10Syncronize filesystems to disk when suspending. Each mountpoint's vnodesTheo de Raadt
are pushed to disk. Dangling vnodes (unlinked files still in use) and vnodes undergoing change by long-running syscalls are identified -- and such filesystems are marked dirty on-disk while we are suspended (in case power is lost, a fsck will be required). Filesystems without dangling or busy vnodes are marked clean, resulting in faster boots following "battery died" circumstances. Tested by numerous developers, thanks for the feedback.
2017-12-30Don't pull in <sys/file.h> just to get fcntl.hPhilip Guenther
ok deraadt@ krw@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-04-20Tweak lock inits to make the system runnable with witness(4)Visa Hankala
on amd64 and i386.
2017-02-08Move a pointer deref to after a NULL test.Jonathan Gray
ok krw@
2016-09-24use hashfree in fs code. from Mathieu -Ted Unangst
ok guenther