summaryrefslogtreecommitdiff
path: root/sys/miscfs
AgeCommit message (Collapse)Author
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-27Currently dead vnodes still reside on the vnodelist of the file systemhannken
they have been removed from. Create a "dead mount" that takes dead vnodes until they get freed. Discussed on tech-kern.
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-10Change layerfs_vget(), layerfs_fhtovp() and the various layer xxx_mount()hannken
functions to unlock/relock the node for the call to layer_node_create(). Finally remove dirty hacks (LK_NOWAIT, kpause) from layer_node_find().
2014-02-09Adjust comment and change vput() to vrele(). This change got missedhannken
when changing vnode creation operations to return unlocked result.
2014-02-09When layer_node_alloc() finds another thread already inserted the nodehannken
into the hashlist and discards the now unneeded node it will raise a panic "dead but not clean". Reorder the initialization and use ungetnewvnode() to discard the node.
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-02-06Move fstrans_start()/fstrans_done() into genfs_insane_rename() to protecthannken
the complete rename operation like we do for all other vnode operations.
2014-01-29Allow layer_node_create() with unlocked lower node and changehannken
layer_bypass() to enter nodes from creation operations unlocked.
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
2013-11-27Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQchristos
anymore, all the macros expand to NULL anyway, so this improves readability. Requested by rmind@
2013-11-23change the mountlist CIRCLEQ into a TAILQchristos
2013-11-07Add missing operations that unlock or dereference their arguments.hannken
Stop checking for a vnode state change -- dead vnodes never change state.
2013-10-29Vnode API cleanup pass 1.hannken
- Make these defines and functions private to vfs_vnode.c: VC_MASK, VC_LOCK, DOCLOSE, VI_IANCTREDO and VI_INACTNOW vclean() and vrelel() - Remove the long time unused lwp argument from vrecycle(). - Remove vtryget(), it is responsible for ugly hacks and doesn't look that effective. Presented on tech-kern. Welcome to 6.99.25
2013-10-25Turn a few __unused into __diagusedmartin
2013-10-19Mark a potentially unused variablemartin
2013-10-19Mark a potentially unused (if an arch implements pmap_update as emptymartin
macro) variable accordingly.
2013-09-30Replace macro v_specmountpoint with two functions spec_node_getmountedfs()hannken
and spec_node_setmountedfs() to manage the file system mounted on a device. Assert the device is a block device. Welcome to 6.99.24 Discussed on tech-kern@ some time ago. Reviewed by: David Holland <dholland@netbsd.org>
2013-07-20oops, spell b_bcount properlydholland
2013-07-20In spec_strategy, if fscow_run() fails, set b_resid along with b_errordholland
to avoid panic in biodone. Noticed by riastradh.
2013-07-18PR/48048: Add a missing vm_map_unlock_read() and uvmspace_free() to the ↵ryo
ENOMEM error case in procfs_domap()d
2013-06-16Hang a warning banner on some nasty code I just found.dholland
2013-06-06Add missing declaration of struct vnode.dholland
2013-05-02Fix (harmless) typo in struct genfs_rename_ops::gro_lookup prototype.riastradh
2013-04-21add missing spec_whiteoutdholland
2013-04-08Remove some set but unused variablesskrll
2013-03-18C99 section 6.7.2.3 (Tags) Note 3 states that:plunky
A type specifier of the form enum identifier without an enumerator list shall only appear after the type it specifies is complete. which means that we cannot pass an "enum vtype" argument to kauth_access_action() without fully specifying the type first. Unfortunately there is a complicated include file loop which makes that difficult, so convert this minimal function into a macro (and capitalize it). (ok elad@)
2013-02-13Make the spec_node table implementation private to spec_vnops.c.hannken
To retrieve a spec_node, two new lookup functions (by device or by mount) are implemented. Both return a referenced vnode, for an opened block device the opened vnode is returned so further diagnostic checks "vp == ... sd_bdevvp" will not fire. Otherwise any vnode matching the criteria gets returned. No objections on tech-kern. Welcome to 6.99.17
2012-12-20Change bread() and breadn() to never return a buffer onhannken
error and modify all callers to not brelse() on error. Welcome to 6.99.16 PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)
2012-11-25do something reasonable with kernel semaphores.christos
2012-10-10In layer_lookup(), clear *vpp before returning EROFS, as otherwise adholland
stale value can be returned and this causes a diagnostic panic in namei. In relookup(), clear *vpp before calling VOP_LOOKUP, as is done in lookup_once(), as an additional precautionary measure. (in theory both of these fixes are not required together) Should fix PR 47040.
2012-06-02Add some pre-processor magic to verify that the type of the data itemdsl
passed to sysctl_createv() actually matches the declared type for the item itself. In the places where the caller specifies a function and a structure address (typically the 'softc') an explicit (void *) cast is now needed. Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting AcpiGbl_EnableAmlDebugObject. (mostly passing the address of a uint64_t when typed as CTLTYPE_INT). I've test built quite a few kernels, but there may be some unfixed MD fallout. Most likely passing &char[] to char *. Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-05-31Ooopppsss! sysctl nodes created during module load time cannot bepgoyette
PERMANENT
2012-05-31When built as module, track sysctl node creations, and destroy them onpgoyette
module exit.
2012-05-28add a task process subdirectory for emul linuxchristos
2012-05-22don't block on pager map for read-ahead.yamt
reduce code duplication.
2012-05-08Implement a genfs_rename abstraction.riastradh
First major step in incrementally adapting all the file systems to a saner rename VOP protocol.
2012-05-06- match format with the linux map printingchristos
- fix PK_32 map printing for linux processes should fix 32 bit java stack guard setting.
2012-04-30- Replace some malloc(9) uses with kmem(9).rmind
- G/C M_IPMOPTS, M_IPMADDR and M_BWMETER.
2012-04-29change vflushbuf() to take the full FSYNC_* flags.chs
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that genfs_do_io() can set the appropriate io priority for the I/O. this is the first part of addressing PR 46325.
2012-03-30uid mismatch for file flags changes is expected to fail with EPERM notnjoly
EACCES.
2012-03-22remove KAME IPSEC, replaced by FAST_IPSECdrochner
2012-03-13Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls withelad
something meaningful. All relevant documentation has been updated or written. Most of these changes were brought up in the following messages: http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html Thanks to christos, manu, njoly, and jmmv for input. Huge thanks to pgoyette for spinning these changes through some build cycles and ATF.
2012-02-01Change the syscall API for quotas over to the new non-proplib one.dholland
- struct vfs_quotactl_args -> struct quotactl_args - add sys/stdint.h to sys/quotactl.h for clean userland build - install sys/quotactl.h in /usr/include - update set lists for same - add new marshalling code in libquota - add new unmarshalling code in vfs_syscalls.c - discard proplib interpreter code in vfs_quotactl.c - add dispatching code for the 14 quotactl ops in vfs_quotactl.c - mark the proplib quotactl syscall obsolete - add a new syscall number for the new quotactl syscall - change the name of the syscall to __quotactl() - remove the decl of the old quotactl from quota/quotaprop.h - add a decl of the new quotactl to sys/quotactl.h - update the libc build - update ktruss - remove proplib marshalling code from libquota - update copy of syscall table in gdb ppc sources - hack rumphijack to accomodate new quotactl name (as I recall, pooka wanted such a name change to simplify something, but I don't really see what/how) This change appears to require a kernel version bump for rumpish reasons.
2012-01-29Remove the extra op argument to VFS_QUOTACTL() - the op is now storeddholland
purely in the args structure. This change requires a kernel version bump.
2012-01-29Introduce struct vfs_quotactl_args. Use it.dholland
This change uglifies vfs_quotactl some in order to make room for moving operation-specific but FS-independent logic out of ufs_quota.c. Note: this change requires a kernel version bump.
2012-01-29Move the proplib-based quota command dispatching (that is, the codedholland
that knows the magic string names for the allowed actions) out of UFS-specific code and to fs-independent code. This introduces QUOTACTL_* operation codes and changes the signature of VFS_QUOTACTL() again for compile safety. Note: this change requires a kernel version bump.
2012-01-29Move the code for iterating over the multiple RPC calls in a quotadholland
proplib XML packet to vfs_quotactl.c out of sys/ufs/ufs. Add a dummy extra arg to VFS_QUOTACTL for compile safety. Note: this change requires a kernel version bump.
2011-12-21only set CANTRCVMORE if no error.christos