summaryrefslogtreecommitdiff
path: root/sys/fs/cd9660
AgeCommit message (Collapse)Author
2022-08-06s/blity/bility/ in various words, mainly in comments.andvar
2022-05-03Lock devvp for vinvalbuf().hannken
2022-03-27dedup the eofs link/symlink methodschristos
2021-07-19Abolish all the silly indirection macros for initializing vnode ops tables.dholland
These are things of the form #define foofs_op genfs_op, or #define foofs_op genfs_eopnotsupp, or similar. They serve no purpose besides obfuscation, and have gotten cutpasted all over everywhere. Part 2; cvs randomly didn't commit these changes before, and then hid them from me until I touched the files to force it to rethink. Dunno what happened. There's probably more of these, going to have to scan the tree the hard way.
2021-07-18Abolish all the silly indirection macros for initializing vnode ops tables.dholland
These are things of the form #define foofs_op genfs_op, or #define foofs_op genfs_eopnotsupp, or similar. They serve no purpose besides obfuscation, and have gotten cutpasted all over everywhere.
2021-07-18Use macros for the canned parts of device and fifo vnode op tables.dholland
Add GENFS_SPECOP_ENTRIES and GENFS_FIFOOP_ENTRIES macros that contain the portion of the vnode ops table declaration that is (conservatively) the same in every fs. Use these in every fs that supports devices and/or fifos with separate ops tables. Note that ptyfs works differently (it has one type of vnode with open-coded dispatch to the specfs code, which I haven't changed in this commit) and rump/librump/rumpvfs/rumpfs.c has an indirect dynamic dispatch that already does more or less the same thing, which I also haven't changed. Also note that this anticipates a few bits in the next changeset here and there, and adds missing but unreachable calls in some cases (e.g. most fses weren't defining whiteout on devices and fifos, but it isn't reachable there), and it changes parsepath on devices and fifos to genfs_badop from genfs_parsepath (but it's not reachable there either). It appears that devices in kernfs were missing kqfilter, so it's possible that if you try to use kqueue on /kern/rootdev that it'll explode. And finally note that the ops declaration tables aren't order-dependent. (Other than vop_default_desc has to come first.) Otherwise this wouldn't work.
2021-06-29- Add a new vnode op: VOP_PARSEPATH.dholland
- Move namei_getcomponent to genfs_vnops.c and call it genfs_parsepath. - Add a parsepath entry to every vnode ops table. VOP_PARSEPATH takes a directory vnode to be searched and a complete following path and chooses how much of that path to consume. To begin with, all parsepath calls are genfs_parsepath, which locates the first '/' as always. Note that the call doesn't take the whole struct componentname, only the string. The other bits of struct componentname should not be needed and there's no reason to cause potential complications by exposing them.
2020-06-27Introduce genfs_pathconf() and use it for the default case in all filesystems.christos
2020-05-16Add ACL support for FFS. From FreeBSD.christos
2020-04-23PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of ↵ad
itself) - Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed somewhere. Use it to decide whether to do direct-mapped copy, rather than poking around directly in the vnode in ubc_uiomove(), which is ugly and doesn't work for tmpfs. It would be nicer to contain all this in UVM but the filesystem provides the needed locking here (VV_MAPPED) and to reinvent that would suck more. - Rename UBC_UNMAP_FLAG() to UBC_VNODE_FLAGS(). Pass in UBC_ISMAPPED where appropriate.
2020-04-04Merge the remaining changes from the ad-namecache branch, affecting namei()ad
and getcwd(): - push vnode locking back as far as possible. - do most lookups directly in the namecache, avoiding vnode locks & refs. - don't block new refs to vnodes across VOP_INACTIVE(). - get shared locks for VOP_LOOKUP() if the file system supports it. - correct lock types for VOP_ACCESS() / VOP_GETATTR() in a few places. Possible future enhancements: - make the lookups lockless. - support dotdot lookups by being lockless and inferring absence of chroot. - maybe make it work for layered file systems. - avoid vnode references at the root & cwd.
2020-03-16Use the module subsystem's ability to process SYSCTL_SETUP() entries topgoyette
automate installation of sysctl nodes. Note that there are still a number of device and pseudo-device modules that create entries tied to individual device units, rather than to the module itself. These are not changed.
2020-01-17VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, toad
allow us to get shared locks (or no lock) on the returned vnode. Matches FreeBSD.
2019-07-12Fix info leak: zero out the buffer, because it is not entirely filled, andmaxv
the uninitialized bytes get copied to userland in sys___getdens30(). Remove unneeded cast while here.
2018-08-22- Cleanup for dynamic sysctl:msaitoh
- Remove unused *_NAMES macros for sysctl. - Remove unused *_MAXID for sysctls. - Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and use them on all m68k machines.
2017-05-26Eliminate crusty debugging sludge.riastradh
We have a mostly sane vnode lifecycle now. If this needs debugging, it should be done once at the call site of VOP_RECLAIM.
2017-05-26Make VOP_RECLAIM do the last unlock of the vnode.riastradh
VOP_RECLAIM naturally has exclusive access to the vnode, so having it locked on entry is not strictly necessary -- but it means if there are any final operations that must be done on the vnode, such as ffs_update, requiring exclusive access to it, we can now kassert that the vnode is locked in those operations. We can't just have the caller release the last lock because some file systems don't use genfs_lock, and require the vnode to remain valid for VOP_UNLOCK to work, notably unionfs.
2017-04-17Remove unused argument "nextp" from vfs_busy() and vfs_unbusy().hannken
Remove argument "keepref" from vfs_unbusy() and add vfs_ref() where needed.
2017-04-17Add vfs_ref(mp) and vfs_rele(mp) to add or remove a reference tohannken
struct mount. Rename vfs_destroy(mp) to vfs_rele(mp) and replace incrementing mp->mnt_refcnt with vfs_ref(mp).
2017-04-11Make VOP_INACTIVE preserve vnode lock on return.riastradh
Discussed on tech-kern: https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html Ride 7.99.68, a bumpy bus of incremental vfs improvements!
2017-02-17Add generic genfs_suspendctl() and use it for all file systems.hannken
Layered file systems need work.
2016-08-20Remove now obsolete operation vcache_remove().hannken
Welcome to 7.99.36
2016-03-12PR/50951: Unmess this up.christos
2016-03-11PR/50951: David Binderman: Fix misplaced parenschristos
2016-03-09remove installboot.h; it is not neededchristos
2016-03-09Make it usable from userland.christos
2015-05-17update: runs as a userspace process now.pooka
2015-05-17Remove. For example, vfs_cluster hasn't existed since early UBC dayspooka
(which were 10+ years ago).
2015-04-20Make VOP_LINK return directory still locked and referenced.riastradh
Ride 7.99.10 bump.
2015-03-28Remove the 'cred' argument from bread(). Remove a now unused var inmaxv
ffs_snapshot.c. Update the man page accordingly. ok hannken@
2015-03-28Remove the 'cred' argument from breadn(), and update the man pagemaxv
accordingly. ok hannken@
2014-11-10Do not uselessly include <sys/malloc.h>.maxv
2014-10-11Define filesystem attributes with vfs dependency.uebayasi
2014-07-25Add VOP_FALLOCATE and VOP_FDISCARD to every vnode ops table I candholland
find. The filesystem ones all call genfs_eopnotsupp - right now I am only implementing the plumbing and we can implement fallocate and/or fdiscard for files later. The device ones call spec_fallocate (which is also genfs_eopnotsupp) and spec_fdiscard, which dispatches to the device-level op. The fifo ones all call vn_fifo_bypass, which also ends up being EOPNOTSUPP.
2014-07-09Remove ROOTNAME (unused).maxv
2014-06-22CID 1223346: No need to check bp against NULL. It is always valid here.hannken
2014-06-16Change cd9660 from hashlist to vcache.hannken
2014-06-14Remove the hints "isodir" and "relocated" from cd9660_vget_internal()hannken
and always reread the directory entry by inumber. For directories the directory entry is always its "." entry. Always read directories via the device vnode to prevent buffer cache inconsistency. Keep i_devvp as a hint for fstat(1) and friends and always use im_devvp for reads. No need to vref()/vrele() i_devvp. The additional bread is either cached because cd9660_lookup() just released the buffer or will be used in the near future when the directory gets traversed during lookup. No objections on tech-kern@
2014-06-03Introduce two helper functions to centralise the namecache statisticsjoerg
in vfs_cache.c. Use consistent locking around the per-cpu data.
2014-06-01PR kern/48815: do not skip ';' twice when comparing file versions.martin
Patch from Thomas Schmitt.
2014-05-13PR kern/48799: make filehandles properly use 64bit inodes on CD9660 filemartin
systems. Patch from Thomas Schmitt, with slight modifications.
2014-05-10PR kern/48787: inode calculation from ISO9660 block offset might getmartin
truncated to 32bit - force the whole expression to be evaluated as ino_t. Patch from Thomas Schmitt, with minor modifications (and reworded comment).
2014-04-16An (un)privileged user can easily make the kernel dereference a NULLmaxv
pointer. The kernel allows 'data' to be NULL; it's the fs's responsibility to ensure that it isn't NULL (if the fs actually needs data). ok christos@
2014-03-24Tidy up locking in cd9660_mount; thrash the lock less, and make itdholland
clear that the lock is only dropped when calling iso_mountfs(). While here, don't use the vnode pointer's value after vrele().
2014-03-23Change all vfsops to use C99 designated initializers.hannken
No functional changes intended.
2014-02-27The current implementation of vn_lock() is racy. Modification ofhannken
the vnode operations vector for active vnodes is unsafe because it is not known whether deadfs or the original file system will be called. - Pass down LK_RETRY to the lock operation (hint for deadfs only). - Change deadfs lock operation to return ENOENT if LK_RETRY is unset. - Change all other lock operations to check for dead vnode once the vnode is locked and unlock and return ENOENT in this case. With these changes in place vnode lock operations will never succeed after vclean() has marked the vnode as VI_XLOCK and before vclean() has changed the operations vector. Adresses PR kern/37706 (Forced unmount of file systems is unsafe) Discussed on tech-kern. Welcome to 6.99.33
2014-02-25Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist beforepooka
the sysctl link sets are processed, and remove redundancy. Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate lines of code.
2014-02-07Change vnode operation lookup to return the resulting vnode *vpp unlocked.hannken
Change cache_lookup() to return an unlocked vnode. Discussed on tech-kern@ Welcome to 6.99.31
2014-01-23Change vnode operations create, mknod, mkdir and symlink to returnhannken
the resulting vnode *vpp unlocked. Discussed on tech-kern@ Welcome to 6.99.30
2014-01-17Change vnode operations create, mknod, mkdir and symlink to keep thehannken
directory node dvp locked on return. Discussed on tech-kern@ Welcome to 6.99.29